What OS are you looking for to check physical cpu's? You can try to get it for all OS via nsh script job
i already use the nsh script job, however when i use that job i get the results of number of logical CPU since i need the physical number.
the OS is AIX.
ncpu/nover commands will give you logical CPU details only.
For physical details, I think you will have to fall back to OS specific commands, which in case of AIX I think are lsattr, lscfg etc and invoke those using nexec from your nsh script job.
Does this work for you?
Could you please let me know the exact need/use-case behind wanting to know the number of physical CPUs?
If it is AIX , did you try with "/usr/sbin/prtconf | grep "Number Of Processors" |cut -d: -f2". It will give you number of physical processors.