To Check number of CPU’s in the Server

To Check number of CPU’s in the Server

Linux

cat /proc/cpuinfo | grep “processor”|wc –l
HP-UX
ioscan -C processor | grep processor | wc –l
SUN Solaris
psrinfo -v|grep “Status of processor”|wc –l
AIX
lsdev -C|grep Process|wc –l
To identify High Disk I/o using Unix command
/usr/bin/ps -eo pid,user,pcpu,args | grep -v %CPU |  sort -nbk 3 | tail -25

To report the current CPU Activity

sar -u 1 5

sar utility can be used to provide various information about the server resources.

In the above example the parameters used and the details are as mentioned below
-u option is for CPU related information
1 is the frequency of execution of the command in seconds
5 is the number of times the command should be executed.
So the command displays the CPU information every 1 second for 5 times.

It reports the CPU related usage by the user(%usr), system(%sys), the CPU Wait for I/O(%wio) and the Idle Percentage(%idle).

Sample Output

14:08:17    %usr    %sys    %wio   %idle   physc
14:08:18      25        0          0           75       4.00
14:08:19      25        0          0           74       4.00
14:08:20      25        0          0           75       4.00
14:08:21      25        0          0           75       4.00
14:08:22      25        0          0           75       4.03
Average       25        0          0           75       4.01

No comments:

Post a Comment