Belitre
22nd July 2005, 13:12
I'm working with BaaN IV over Solaris.
Is there any unix command which let me know the CPU state?
I'd like to execute it via Telnet.

Thanks and Regards.

bdittmar
22nd July 2005, 13:29
I'm working with BaaN IV over Solaris.
Is there any unix command which let me know the CPU state?
I'd like to execute it via Telnet.

Thanks and Regards.

don't know it on solaris,

HPUX11i top and yamm are tools to monitor cpu / system via telnet.

Maybe YAMM is available for solaris .

Regards

NPRao
22nd July 2005, 20:49
Belitre,

Refer to the link - Topping top in Solaris 8 with prstat (http://developers.sun.com/solaris/articles/prstat.html)

{bb} Quick and dirty 'top' for Solaris and AIX (http://support.bb4.com/archive/200105/msg01122.html)

For users without the 'top' utility installed, on AIX and Solaris they can
also use something like:
--------------------------
#!/bin/sh
PS=/bin/ps
CUT=/usr/bin/cut
SORT=/usr/bin/sort
HEAD=/usr/bin/head

if [ -x $PS -a -x $CUT -a -x $SORT -a -x $HEAD ]
then
echo
echo " %CPU PID TIME VSZ USER COMMAND"
echo
$PS -aef -o pcpu= -o pid= -o time= -o vsz= -o user= -o args= |
$CUT -c -130 | $SORT -r | $HEAD -10
else
exit 1
fi
---------------------------
and then assign this script to the 'TOP' variable in bbsys.sh. After that,
the 'cpu' test will show additional info

Viplov
23rd July 2005, 10:41
Just try the below syntax in /usr/platform/sun4u/sbin

./prtdiag

I think this will solve your problem.


Viplov

Belitre
27th July 2005, 17:18
Thanks a lot for the information, NPrao. I've got now some questions.

1. Using of mpstat. When I execute mpstat without parameters I always get similar values for my 2 cpu's:

cpu usr sys wt idl
2 18 6 9 68
3 17 6 10 67

but when I execute, for instance, "mpstat 5 5" I get different values:

execution cpu usr sys wt idl
1 2 18 6 9 68
1 3 17 6 10 10
---------------------
3 2 38 24 22 16
3 3 47 19 20 14
---------------------
5 2 45 19 16 20
5 3 40 18 25 16

Do you think this is working properly in both cases?
Is wt percentage caused by mpstat command?

2.- 'diry' top for solaris.
How could I execute the script with a parameter? I would like to choose the number of processes I evaluate, instead of a fixed number.

3.- Is it posible to install 'prstat' in an older version of Solaris?

Thanks again, and regards.

NPRao
27th July 2005, 20:25
Its been a while I worked on Solaris. Others can give their comments here or you should check more at the Unix forums to get a faster response.

I find these groups interesting and wide rangng - Unix Help (http://forums.devshed.com/f35/s), Unix Forum (http://www.unix.com/)

sanjayroongta
28th July 2005, 09:07
Hi Belitre,

Reg. mpstat command on unix. In both case it works perfectly. Here I am pasting manual of mpstat

mpstat reports per-processor statistics in tabular form.
Each row of the table represents the activity of one proces-
sor. The first table summarizes all activity since boot;
each subsequent table summarizes activity for the preceding
interval. All values are rates (events per second) unless
otherwise noted.

Hope above information satisfy you.

You can also check iostat :

NAME
iostat - report I/O statistics

SYNOPSIS
/usr/bin/iostat [ -cCdDeEImMnpPrstxz ] [ -l n ] [ -T u | d
] [ disk ... ] [ interval [ count ] ]

DESCRIPTION
The iostat utility iteratively reports terminal, disk, and
tape I/O activity, as well as CPU utilization. The first
line of output is for all time since boot; each subsequent
line is for the prior interval only.

Reg. prtdiag command, you may check health of your server completly.

rgds