DevHeads.net

Resource utilisation of processes on linux server.

Hi,

I have around 6 processes running on CentOS Linux release 7.6.1810 (Core).
Is there a way to find out which process is taking resources like memory,
CPU, I/O and network.

Process 1 : How much memory, CPU, I/O and network is currently consuming on
linux server
Process 2 : How much memory, CPU, I/O and network is currently consuming on
linux server
Process 3 : How much memory, CPU, I/O and network is currently consuming on
linux server and so on and so forth.

Thanks in Advance and i look forward to hearing from you.

Best Regards,

Kaushal

Comments

Re: Resource utilisation of processes on linux server.

By Johnny Hughes v... at 04/14/2019 - 10:02

On 14/04/2019 14:17, Kaushal Shriyan wrote:
From the command line there is always top(1). If you want a GUI then
System Tools > System Moinitor and click on "Processes". All the
columns are sortable.

Re: Resource utilisation of processes on linux server.

By Kaushal Shriyan at 04/14/2019 - 11:29

Hi

On Sun, Apr 14, 2019 at 7:33 PM J Martin Rushton via CentOS <

Hi Martin,

Thanks for the email. I will be interested in command line interface
tool/utility. Is there a way to find out the previous occurrence of
resource utilization? For example, there was a high load on the Linux
server which occurred three days back during the time of 3:00 AM to 4:00 AM
meaning historical data.

Thanks in Advance and i look forward to hearing from you.

Best Regards,

Kaushal

Re: Resource utilisation of processes on linux server.

By Pete Biggs at 04/14/2019 - 11:51

You need to look at system accounting. The command 'sa' reports on
accounting information and the command 'accton' turns on per process
accounting. It's not usually turned on by default (on busy systems the
accounting files can get large) and it's not retrospective. (So if it's
not turned on, any per-process logs are lost once the process
terminates.)

P.

Re: Resource utilisation of processes on linux server.

By Johnny Hughes v... at 04/14/2019 - 12:08

On 14/04/2019 16:51, Pete Biggs wrote:
sa logs aren't usually too big, but the process logs can get pretty
large. sa logs are usually processed overnight to sar reports which are
a good starting point (see /var/log/sa). If you are running an audit
trail that may give you additional information, as would monitoring
tools such as Ganglia.

Re: Resource utilisation of processes on linux server.

By Richard at 04/14/2019 - 11:49

If you don't have any usage monitoring turned on, then after the fact
the answer is no.

A simple approach is to run top in batch mode (see the top man page)
from a cron job that you run at whatever frequency you want to
capture data for. Log that, and say vmstat output - perhaps sending
an alert when the vmstat load is above some threshold. This is all
fairly lightweight and easy to set up. There are other packages that
can get more detail, but take some learning and setup time.

Remember that things like logrotate, logwatch etc., tend to run in
the ~3am timeframe (depending on your configuration). These can
generate fairly high spot load if your logs are large.

- Richard

[please only reply to the list.]