Determine process which consumed CPU cores

Jamie Fargen jfargen at gmail.com
Mon Sep 23 17:52:07 UTC 2019


Sar is run from a cron job. You can write a script runs top in batch mode
(/bin/top -b -n 1) and appends some datestamp to the output and writes it
to /var/log/top.log.

The script that runs top in batch mode, can then be executed from the same
cronjob so it is run at the same time.

*/10 * * * * root /usr/lib/sa/sa1 1 1 && /usr/local/bin/topBatch.sh

Regards,

-Jamie


On Mon, Sep 23, 2019 at 1:43 PM raj sourabh <rajsourabh1 at gmail.com> wrote:

> Hi, you can analyze it using top, mstat or sysstat also. However if you
> want to monitor and analyze the data for certain processes than you need a
> monitoring system like snmp based tools (nagios)..
>
> On Thu, Sep 19, 2019 at 9:33 PM Kaushal Shriyan <kaushalshriyan at gmail.com>
> wrote:
>
> > Hi,
> >
> > Is there a way to find out which process consumed CPU cores as per the
> > below sar output? OS is Red Hat Enterprise Linux Server release 7.7
> (Maipo)
> > with 64-bit arch.
> >
> > 04:40:01 PM     CPU     %user     %nice   %system   %iowait    %steal
> > %idle
> > 04:50:01 PM     all      4.25      0.00      0.69      0.00      0.03
> > 95.03
> > 05:00:01 PM     all      4.41      0.00      0.70      0.00      0.03
> > 94.85
> >
> >
> > *05:10:02 PM     all     40.92      0.01      1.23      0.01      0.06
> > 57.7705:20:01 PM     all     90.54      0.00      0.90      0.00
> 0.02
> >      8.5305:30:01 PM     all     19.06      0.00      1.53      1.25
> >  0.04     78.12*
> > 05:40:01 PM     all      3.99      0.00      0.29      0.03      0.02
> > 95.66
> > 05:50:01 PM     all      2.97      0.00      0.25      0.00      0.02
> > 96.75
> > 06:00:01 PM     all      2.69      0.00      0.24      0.00      0.02
> > 97.04
> > 06:10:01 PM     all      2.61      0.01      0.26      0.00      0.02
> > 97.09
> >
> > # lscpu
> > Architecture:          x86_64
> > CPU op-mode(s):        32-bit, 64-bit
> > Byte Order:            Little Endian
> > CPU(s):                8
> > On-line CPU(s) list:   0-7
> > Thread(s) per core:    2
> > Core(s) per socket:    4
> > Socket(s):             1
> > NUMA node(s):          1
> > Vendor ID:             GenuineIntel
> > CPU family:            6
> > Model:                 63
> > Model name:            Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
> > Stepping:              2
> > CPU MHz:               2899.842
> > BogoMIPS:              5800.13
> > Hypervisor vendor:     Xen
> > Virtualization type:   full
> > L1d cache:             32K
> > L1i cache:             32K
> > L2 cache:              256K
> > L3 cache:              25600K
> > NUMA node0 CPU(s):     0-7
> > Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
> pge
> > mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp
> > lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma
> > cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave
> > avx f16c rdrand hypervisor lahf_lm abm invpcid_single fsgsbase bmi1 avx2
> > smep bmi2 erms invpcid xsaveopt
> > # nproc
> > 8
> > #
> >
> > Thanks in advance and i look forward to hearing from you.
> >
> > Best Regards,
> >
> > Kaushal
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> --
> Regards,
> Raj
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



More information about the redhat-list mailing list