Hi Everyone :),
Need your advice as I'm new to UNIX scripting.. I'm trying to write a script to capture snoop output for 5 minutes for every hour for 24 hours. To stop snoop, I need to press Control-C to break it. This is what I got so far, but now I'm stuck! :confused:
The script:
# cat... (2 Replies)
Trying to finish up my script that automates some video encoding work.
Situation: There is an MKV file to be transcoded.
Problem: MKVINFO will give a bunch of output about an MKV file, included in that output are two lines I am interested in:
| + Default duration: 41.708ms (23.976 fps... (9 Replies)
Hi All,
I need help on the following req.
I am getting output of a command as follows:
16377612 total memory
3802460 used memory
2827076 active memory
681948 inactive memory
12575152 free memory
477452 buffer memory
I want to compute used... (1 Reply)
hi,
i have the followiing scenario where by i am parsing teh following output using cut -d
like so
#!/bin/bash
output="ABCTable|
------------------|
|
------------------|
code |
name |
amount |"
col1= $output | cut -d'|' -f5
col2= $output | cut -d'|'... (1 Reply)
Hi!
I have run the following command: snoop -q -d e1000g0 -o /var/tmp/optima0.txt & them I am trying to read the output of it with snoop -i /var/tmp/optima0.txt, which is giving me this: # snoop -i /var/tmp/optima0.txt | more
1 0.00000 AIOPTSVR -> 10.100.4.72 TCP D=1393 S=22 Push... (8 Replies)
Hi ,
I have a jil file which i am trying to parse and print the job name and the condition corresponding to it.
Below is the input file
/* -------------------- testjob1 -------------------- */
insert_job: testjob1 job_type: c
machine: unix
owner: chidori
condition: s(joba) and... (9 Replies)
Output of the below code includes unmatched date.Please correct it
df -k|awk '$4>50 {print $1, "\t"$4,"\t" $7}'
It gives output less than 50% also. (5 Replies)
Hi,
I got the code below is one of the threads from this forum.
lineCount=$(iostat | wc -l)
numDevices=$(expr $lineCount - 7);
iostat $interval -x -t |
awk -v awkCpuFile=$cpuFile -v awkDeviceFile=$deviceFile -v awkNumDevices=$numDevices '
BEGIN {
print... (2 Replies)
Discussion started by: gopivallabha
2 Replies
LEARN ABOUT OSX
iopattern
iopattern(1m) USER COMMANDS iopattern(1m)NAME
iopattern - print disk I/O pattern. Uses DTrace.
SYNOPSIS
iopattern [-v] [-d device] [-f filename] [-m mount_point] [interval [count]]
DESCRIPTION
This prints details on the I/O access pattern for the disks, such as percentage of events that were of a random or sequential nature. By
default totals for all disks are printed.
An event is considered random when the heads seek. This program prints the percentage of events that are random. The size of the seek is
not measured - it's either random or not.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS -v print timestamp, string
-d device
instance name to snoop (eg, dad0)
-f filename
full pathname of file to snoop
-m mount_point
mountpoint for filesystem to snoop
EXAMPLES
Default output, print I/O summary every 1 second,
# iopattern
Print 10 second samples,
# iopattern 10
Print 12 x 5 second samples,
# iopattern 5 12
Snoop events on the root filesystem only,
# iopattern -m /
FIELDS
%RAN percentage of events of a random nature
%SEQ percentage of events of a sequential nature
COUNT number of I/O events
MIN minimum I/O event size
MAX maximum I/O event size
AVG average I/O event size
KR total kilobytes read during sample
KW total kilobytes written during sample
DEVICE device name
MOUNT mount point
FILE filename (basename) for I/O operation
TIME timestamp, string
IDEA
Ryan Matteson
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
iopattern will run forever until Ctrl-C is hit, or the specified count is reached.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO iosnoop(1M), iotop(1M), dtrace(1M)version 0.70 Jul 25, 2005 iopattern(1m)