[CentOS] Resource utilisation of processes on linux server.

Sun Apr 14 15:49:23 UTC 2019
Richard <lists-centos at listmail.innovate.net>

>> On 14/04/2019 14:17, Kaushal Shriyan wrote:
>> >
>> > 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.

> On Sun, Apr 14, 2019 at 7:33 PM J Martin Rushton via CentOS <
> centos at centos.org> 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.
> Date: Sunday, April 14, 2019 20:59:45 +0530
> From: Kaushal Shriyan <kaushalshriyan at gmail.com>
> 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.

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.]