Recording / Monitoring Shell Script Resource Usage.

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Infrastructure Monitoring Recording / Monitoring Shell Script Resource Usage.
# 1  
Old 08-18-2014
Recording / Monitoring Shell Script Resource Usage.

I need to record min and max resources for RAM, & CPU for each command's execution in a shell script. Maybe going in details I would also be interested to capture plots with resource usage i.e.start to end of individual command with respect to time in a shell script.

Please share ideas.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Recording user input from interactive shell script

Hello, I want to start out by saying that I am fairly new to scripting and am looking for someone that can point me in the right direction. Basically what I need is a way to run a interactive script that will prompt users with questions weather that be yes/no or a specific answer.. I want to be... (3 Replies)
Discussion started by: shoutcast
3 Replies

2. UNIX for Advanced & Expert Users

Identify cause of high resource usage

hello all, on linux servers sometimes any of these resources (cpu,memory,disk) get a spike when you are not in front of the server. the duration of these spikes might be 5 mins or even whole weekend. my question is there a good way of capturing the events that caused these issues ( cpu or... (5 Replies)
Discussion started by: coolatt
5 Replies

3. AIX

How to install system resource monitoring utilities?

Hello Experts, Topas, nmon, vmon & top monitoring tool not working. We use above AIX utilities to identify cpu and memory usage. I can execute the topas but on execution I receive "SpmiCreateStatSet can't create StatSet" message & no output. I use AIX 5.3, TL3. Please assist to restore... (4 Replies)
Discussion started by: sumit30
4 Replies

4. Red Hat

HELP - Resource/Performance Monitoring Script - Red Hat Enterprise Linux Server

Hi all, ------------------------- Linux OS Version/Release: ------------------------- Red Hat Enterprise Linux Server release 5.5 (Tikanga) Linux <hostname> 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux I have a server that hosts 30+ Oracle... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. AIX

Resource Group Monitoring

Hi, I have a requirement to monitor the HACMP Resource Groups. At present in my environment, if the Resource Groups fail over from preferred node to Secondary node we dont get notification. Can some one help me in creating a scrript. I have more than one RG online. (Max 4 Resource Groups in... (2 Replies)
Discussion started by: srnagu
2 Replies

6. UNIX for Dummies Questions & Answers

Mail/ftp/web servers, on VIRTUAL!! dedicated server. Also resource usage. Centos 5.

Hi. First of all, would 4 or 5 websites, 1 ftp server (when downloading by someone or a few persons or one, concretize) and one mail server (not many emails, just to sound official and have a nice, spam-free email for myself). Websites with not that many, but some, later more visitors, quite... (0 Replies)
Discussion started by: newn
0 Replies

7. UNIX for Dummies Questions & Answers

Process Resource Usage

Hi There, I'm trying to find a way to gather resource usage information (CPU, Memory & Virtual Memory) for a single process in a scripted way. I've looked at vmstat & top but I can't figure out how to use them to get the information for a single process. can any one help with this? ... (2 Replies)
Discussion started by: Murph
2 Replies

8. UNIX for Dummies Questions & Answers

newbie: way to learn more about server's resource usage

I have a dedicated server running centos. It is "slightly managed" meaning I get a little help if I desperately need it; otherwise on my own. Many of the programs on this server I've had to write myself (less than optimal code for sure). Others are commercial but some are renowned resource... (2 Replies)
Discussion started by: blakekr
2 Replies

9. UNIX for Dummies Questions & Answers

recording cpu and memory usage

Is there a way for me to record cpu and memory usage over time without buying and installing new software? I know I can use top to see the current state, but can I record that data somehow? (2 Replies)
Discussion started by: cshih31
2 Replies

10. Shell Programming and Scripting

Q: Recording shell script screen output using "script" command ?

Hello, I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work. I know there is a special unix command call "script" which records screen session but the... (4 Replies)
Discussion started by: lalfonso.gomez
4 Replies
Login or Register to Ask a Question
SYSTEMD-CGTOP(1)						   systemd-cgtop						  SYSTEMD-CGTOP(1)

NAME
systemd-cgtop - Show top control groups by their resource usage SYNOPSIS
systemd-cgtop [OPTIONS...] DESCRIPTION
systemd-cgtop shows the top control groups of the local Linux control group hierarchy, ordered by their CPU, memory and disk I/O load. The display is refreshed in regular intervals (by default every 1s), similar in style to top(1). Resource usage is only accounted for control groups in the relevant hierarchy, i.e. CPU usage is only accounted for control groups in the cpuacct hierarchy, memory usage only for those in memory and disk I/O usage for those in blkio. systemd(1) by default places all services in their own control group in the cpuacct hierarchy, but not in memory nor blkio. If resource monitoring for these resources is required it is recommended to add blkio and memory to the DefaultControllers= setting in /etc/systemd/system.conf (see systemd.conf(5) for details). Alternatively, it is possible to enable resource accounting individually for services, by making use of the ControlGroup= option in the unit files (See systemd.exec(5) for details). To emphasize this: unless blkio and memory are enabled for the services in question with either of the options suggested above no resource accounting will be available for system services and the data shown by systemd-cgtop will be incomplete. OPTIONS
The following options are understood: -h, --help Prints a short help text and exits. -p Order by control group path name. -t Order by number of tasks in control group (i.e. threads and processes). -c Order by CPU load. -m Order by memory usage. -i Order by disk I/O load. -d, --delay= Specify refresh delay in seconds (or if one of ms, us, min is specified as unit in this time unit). --depth= Maximum control group tree traversal depth. Specifies how deep systemd-cgtop shall traverse the control group hierarchies. If 0 is specified only the root group is monitored, for 1 only the first level of control groups is monitored, and so on. Defaults to 2. KEYS
systemd-cgtop is an interactive tool and may be controlled via user input using the following keys: h Shows a short help text. SPACE Immediately refresh output. q Terminate the program. p, t, c, m, i Change ordering of control groups by path, number of tasks, CPU load, memory usage resp. IO load. +, - Increase, resp. decrease refresh delay. EXIT STATUS
On success 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), systemctl(1), systemd-cgls(1), top(1) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 SYSTEMD-CGTOP(1)