Sponsored Content
Operating Systems AIX How to trace cpu/memory usage for a process Post 302414973 by rainbow_bean on Wednesday 21st of April 2010 12:07:29 PM
Old 04-21-2010
How to trace cpu/memory usage for a process

I don't know when the process will start and end, I need write a script to trace it's cpu/memory usage when it is runing. How to write this script?
 

10 More Discussions You Might Find Interesting

1. Programming

Monitor CPU usage and Memory Usage

how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries through a c program or java program i want to store that data into database so i can show it graphically thanks in advance (2 Replies)
Discussion started by: Gajanad Bihani
2 Replies

2. Programming

CPU usage and memory usage

Please tell me solaris functions/api for getting following information 1- Function that tells how much memory used by current process 2- Function that tells how much memory used by all running processes 3- Function that tells how much CPU is used by current process 4- Function that tells how... (1 Reply)
Discussion started by: mansoorulhaq
1 Replies

3. UNIX for Dummies Questions & Answers

cpu, memory and virtual memory usage

Hi All, Does anyone know what the best commands in the UNIX command line are for obtaining this info: current CPU usage memory usage virtual memory usage preferably with date and time parameters too? thanks ocelot (4 Replies)
Discussion started by: ocelot
4 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

7. UNIX for Advanced & Expert Users

How to find out memory & cpu usage of a process

Hi, By using time command we can determine the execution time of a process or command. bash-2.04$ time ls -l total 0 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file1 -rw-r--r-- 1 admin tac 0 Oct 6 04:46 file2 real 0m0.002s user 0m0.000s sys 0m0.001s... (5 Replies)
Discussion started by: learn more
5 Replies

8. Shell Programming and Scripting

Get the memory and cpu usage

what is the best way to get the memory and cpu usage of a process on any system? this is relatively simple. however, i'm looking for a unified method that would work on linux, sunos, hpux, aix. ps -ef | egrep myprocess | awk '{print $4}' ---> there could be several instances of 'myprocess'... (3 Replies)
Discussion started by: SkySmart
3 Replies

9. Shell Programming and Scripting

Shell script for logging cpu and memory usage of a Linux process

I am looking for a way to log and graphically display cpu and RAM usage of linux processes over time. Since I couldn't find a simple tool to so (I tried zabbix and munin but installation failed) I started writing a shell script to do so The script file parses the output of top command through... (2 Replies)
Discussion started by: andy_dufresne
2 Replies

10. Shell Programming and Scripting

Cpu and memory usage scripts

All I am writing a script to generate an email when cpu and memory usage is high for 5 min continuously help me urgent I wrote below scritpt LOAD=75.00 CPU_LOAD= 'sar -P all 300 5 |grep 'Average.all* '| awk -F " " '(print 100.0 -$NF)'' IF }; ECHO "pLEASE CHECK YOUR PROCESS ON YOUR... (1 Reply)
Discussion started by: anil529
1 Replies
iowatcher(1)						      General Commands Manual						      iowatcher(1)

NAME
iowatcher - Create visualizations from blktrace results SYNOPSIS
iowatcher OPTIONS... DESCRIPTION
iowatcher graphs the results of a blktrace run. It can graph the result of an existing blktrace, start a new blktrace, or start a new blk- trace and a benchmark run. It can then create an image or movie of the IO from a given trace. iowatcher can produce either SVG files or movies in mp4 format (with ffmpeg) or ogg format (with png2theora). OPTIONS
--help Print a brief usage summary. -d, --device <device> Controls which device you are tracing. You can only trace one device at a time for now. It is sent directly to blktrace, and only needed when you are making a new trace. -D, --blktrace-destination <destination> Destination for blktrace. -p, --prog <program> Program to run while blktrace is run. -K, --keep-movie-svgs Keep the SVG files generated for movie mode. -t, --trace <file|directory> Controls the name of the blktrace file. iowatcher uses a dump from blkparse, so -t tries to guess the name of the corresponding per CPU blktrace data files if the dump file doesn't already exist. If you want more than one trace in a given graph, you can specify -t more than once. If a directory is specified, iowatcher will use the name of the directory as the base name of the dump file and all trace files found inside the directory will be processed. -l, --label <label> Sets a label in the graph for a trace file. The labels are added in the same order the trace files are added. -m, --movie [spindle|rect] Create a movie. The file format depends on the extension used in the -o filename.* option. If you specify an .ogv or .ogg exten- sion, the result will be Ogg Theora video, if png2theora is available. If you use an .mp4 extension, the result will be an mp4 video if ffmpeg is available. You can use any other extension, but the end result will be an mp4. You can use --movie=spindle or --movie=rect, which changes the style of the IO mapping. -T, --title <title> Set a title to be placed at the top of the graph. -o, --output <file> Output filename (default: trace.svg). -r, --rolling <seconds> Control the duration for the rolling average. iowatcher tries to smooth out bumpy graphs by averaging the current second with sec- onds from the past. Larger numbers here give you flatter graphs. -h, --height <height> Set the height of each graph -w, --width <width> Set the width of each graph -c, --columns <columns> Numbers of columns in graph output -x, --xzoom <min:max> Limit processed time range to min:max -y, --yzoom <min:max> Limit processed sectors to min:max -a, --io-plot-action <action> Plot given action (one of Q,D,C) in IO graph -P, --per-process-io Distinguish between processes in IO graph -O, --only-graph <graph> Add a single graph to the output (see GRAPHS). By default all the graphs are included, but with -O you get only the graphs you ask for. -O may be used more than once. -N, --no-graph <type> Remove a single graph from the output (see GRAPHS). This may also be used more than once. GRAPHS
Choices for -O and -N are: io, tput, latency, queue_depth, iops, cpu-sys, cpu-io, cpu-irq, cpu-user, cpu-soft EXAMPLES
Generate graph from the existing trace.dump: iowatcher -t trace.dump -o trace.svg Skip the IO graph: iowatcher -t trace.dump -o trace.svg -N io Only graph tput and latency: iowatcher -t trace.dump -o trace.svg -O tput -O latency Generate a graph from two runs, and label them: iowatcher -t ext4.dump -t xfs.dump -l Ext4 -l XFS -o trace.svg Run a fio benchmark and store the trace in trace.dump, add a title to the top, use /dev/sda for blktrace: iowatcher -d /dev/sda -t trace.dump -T 'Fio Benchmark' -p 'fio some_job_file' Make a movie from an existing trace: iowatcher -t trace --movie -o trace.mp4 iowatcher(1)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy