Sponsored Content
Top Forums Shell Programming and Scripting Need way to grep the following output in bold Post 303014422 by jaapar on Monday 12th of March 2018 08:37:17 AM
Old 03-12-2018
Yes, i would like to set up an email monitoring whenever the DISK READ went above 600MB per second it will trigger an email to me personally.

I was able to get the output of 3 lines but not managed to create a logic when the read go above 600MB.

Code:
[root@xxxx ~]# iotop -bot --iter=3 |grep "Actual DISK READ"| awk {'print $5'}
127.99
151.71
157.06
[root@xxxx ~]#


ok using one second data might help.

Code:
[root@xxxx ~]# iotop -bot --iter=1 |grep "Actual DISK READ"| awk {'print $5'}
145.13
[root@xxxx ~]#

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to underline/bold and how to align output

Hi, I work with AIX 5 and have two basic questions: 1) How do I underline/bold a word in a text output? Any way to do it with echo command? basic example: echo "FOLDER " >> folder.txt ( I wish the word FOLDER to be underlined and bold). 2) Suppose I have the following pipe delimited... (1 Reply)
Discussion started by: clara
1 Replies

2. Shell Programming and Scripting

output of grep

hi, why the following is giving entire /etc/passwd file as output even when it does not contain ^ or $ . grep ' ' /etc/passwd whereas the following is not giving any output grep ' ^$ ' /etc/passwd (3 Replies)
Discussion started by: useless79
3 Replies

3. Shell Programming and Scripting

GREP with contain output

How can I perform a grep and it will give me a contain word (maintenance) instead of a string or the whole line of info. grep with exclusive output? or is there a CONTAIN with IF statement ? I have a file call yast2_vhost.conf and it contain multiple entries call maintenance.html... (2 Replies)
Discussion started by: yoom@hostwebase
2 Replies

4. UNIX for Dummies Questions & Answers

Help with grep output

Hello, I have a list of stings that I'm using with grep to determine which files contain the strings. Here's what I have now: list of strings in a file (list.txt): /directory/direc tory/file.jsp /dire ctory/directory/direct ory/file.jsp grep I'm doing to find files that contain the... (4 Replies)
Discussion started by: upstate_boy
4 Replies

5. Shell Programming and Scripting

grep output

From below mentioned line,i have to display output as last word only ie:arch_1_105366_720809746.dbf -rw-r----- 1 oracle dba 98887680 02 Mar 12:01 arch_1_105366_720809746.dbf Please .. (5 Replies)
Discussion started by: Sanal
5 Replies

6. Shell Programming and Scripting

grep output

hi i am running grep -c on a bunch of files some of which may be non existent. The output i get is in the same order as the files grep checks and this is what i want as i need to copy the output to a spreadsheet. However when i tried to pipe the output to sed to strip away the filenames and just... (5 Replies)
Discussion started by: chronics
5 Replies

7. Shell Programming and Scripting

output text in bold font using SED

hi I want to write a script, while using the SED editor, to output the text, in this case a variable, to the result file but highlighted it in bold, is it possible to do that? can you tell me how? eg. in text.txt sed '$ a\ '$variable' ' <text.txt >text2.txt so it will add the... (2 Replies)
Discussion started by: piynik
2 Replies

8. Shell Programming and Scripting

How to grep the desired output and output to a file?

currently I have process from a raw file to this stage ALTER TABLE "EXCEL_ADMIN"."TC_TXN_VOID" ADD CONSTRAINT "PK_TC_TXN_VOID" PRIMARY KEY ("TC_TXN_IID") ALTER TABLE "EXCEL_ADMIN"."TC_TXN_AMT" ADD CONSTRAINT "PK_TC_TXN_AMT" PRIMARY KEY ("TC_TXN_AMT_IID") ALTER TABLE... (10 Replies)
Discussion started by: jediwannabe
10 Replies

9. UNIX for Dummies Questions & Answers

How to have the output in grep?

Hi guys - I am trying to have a certain file display information horizontally divided by a pipe. for example file name: foo.dat has information like this: name1 name2 name3 namenamename4 namene5 I would like it to display like this: name1|name2|name3|namenamename4|namene5 ... (6 Replies)
Discussion started by: DallasT
6 Replies

10. UNIX for Beginners Questions & Answers

Grep output

Hi. I have a command line that will generate exif data from .jpg files... So to get the Camera Model I use: find -iname "*.jpg" -print0 | xargs -0 exiftool -a | grep "Camera Model" But I want the file name AND the camera model... How to I get the grep to give me TWO bits of information from... (2 Replies)
Discussion started by: TuftyDave
2 Replies
iotop(1m)							   USER COMMANDS							 iotop(1m)

NAME
iotop - display top disk I/O events by process. Uses DTrace. SYNOPSIS
iotop [-C] [-D|-o|-P] [-j|-Z] [-d device] [-f filename] [-m mount_point] [-t top] [interval [count]] DESCRIPTION
iotop tracks disk I/O by process, and prints a summary report that is refreshed every interval. This is measuring disk events that have made it past system caches. Since this uses DTrace, only users with root privileges can run this command. OPTIONS
-C don't clear the screen -D print delta times - elapsed, us -j print project ID -o print disk delta times, us -P print %I/O (disk delta times) -Z print zone ID -d device instance name to snoop (eg, dad0) -f filename full pathname of file to snoop -m mount_point mountpoint for filesystem to snoop -t top print top number only EXAMPLES
Default output, print summary every 5 seconds # iotop One second samples, # iotop 1 print %I/O (time based), # iotop -P Snoop events on the root filesystem only, # iotop -m / Print top 20 lines only, # iotop -t 20 Print 12 x 5 second samples, scrolling, # iotop -C 5 12 FIELDS
UID user ID PID process ID PPID parent process ID PROJ project ID ZONE zone ID CMD command name for the process DEVICE device name MAJ device major number MIN device minor number D direction, Read or Write BYTES total size of operations, bytes ELAPSED total elapsed times from request to completion, us (this is the elapsed time from the disk request (strategy) to the disk completion (iodone)) DISKTIME total times for disk to complete request, us (this is the time for the disk to complete that event since it's last event (time between iodones), or, the time to the strategy if the disk had been idle) %I/O percent disk I/O, based on time (DISKTIME) load 1 minute load average disk_r total disk read Kb for sample disk_w total disk write Kb for sample 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
iotop will run forever until Ctrl-C is hit, or the specified interval is reached. AUTHOR
Brendan Gregg [Sydney, Australia] SEE ALSO
iosnoop(1M), dtrace(1M) version 0.75 Oct 25, 2005 iotop(1m)
All times are GMT -4. The time now is 09:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy