Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using ps -

Status
Not open for further replies.

dodge20

MIS
Jan 15, 2003
1,048
US
Hello

I was asked to look into our system slowness. I came across a ps -ef. I think this shows the current processes. Some of them have times of over a minute, so I assume they are hung up on something. So then I typed ps -ef | grep (pid #) several times in a row for the pid's that were over a minute, but the time didn't increase. So what is this telling me? Is it ok to kill those processes off? Or are they not a factor anymore? Also some of the root processes have a date of september 18. What could this mean?

Dodge20
 
ps TIME tells you the cumulative execution time for the process. Being over one minute does not mean it is a hung process. The date is when the process was started. I bet the last time you reboot'ed the server was September 18th. It is not OK just to kill processes unless you know what your killing. You could bring down the server doing that. The ps command tells you what processes is running and a little info about them. Another tool you should use to see system usage is top. It will show you what percentage the top processes are using.



Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
Thanks, I assumed thats what it meant, when the processes weren't gaining time, but I wanted to be sure.

Dodge20
 
Look into the [tt]sar[/tt] command. It's a good first tool to use when looking for performance problems. Also look into [tt]top[/tt]. If you're on Solaris, try [tt]prstat[/tt]. There are some other tools, but this should get you started.

Then there's [tt]vmstat[/tt], [tt]iostat[/tt], [tt]netstat[/tt], and a whole bunch of others.

Bottom line, [tt]ps[/tt] is NOT the tool to use to look for performance problems. It can help, but don't just use it to find things to kill.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top