Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Tuesday, August 2, 2011

UNIX prstat vs top

While digging for problems in UNIX prstat comes handy in looking at the some of the statistics of the server.

prstat - report active process statistics

example:

Now
statistics are sorted by cpu high -low
prstat -s cpu
or -u for a particular user
prstat -u oracle -s cpu

or top 5 cpu events
prstat -s cpu -n 5

or
prstat -T (total)
Other options available to prstat are:

-a Report information about processes and users
-T Report information about processes and tasks.
  -u    Report only processes whose effective user  ID
  -v    Report  verbose  process  usage

-s key Sort output lines (that is, processes, lwps, or users) by key in descending order. Only one key can be used as an argument. There are five possible key values: cpu Sort by process CPU usage. This is the default. pri Sort by process priority. rss Sort by resident set size. size Sort by size of process image.
-n ntop[,nbottom] (comes with ntop or nbottom)

No comments: