Sponsored Content
Top Forums Shell Programming and Scripting Need way to grep the following output in bold Post 303014420 by jaapar on Monday 12th of March 2018 08:27:18 AM
Old 03-12-2018
Need way to grep the following output in bold

Hi guys,

i am not able to work this out, i need to write a script to monitor the usage of IO DISK READ whenever the IO is above 600MB it will send an email.

So far not able to. Hope you guys can assist me. Thanks!

Code:
[root@xxxx ~]# iotop -bot --iter=3 |grep DISK|egrep -v TIME
05:22:04 Total DISK READ :      20.70 M/s | Total DISK WRITE :    1157.23 K/s
05:22:04 Actual DISK READ:      14.53 M/s | Actual DISK WRITE:    1348.83 K/s
05:22:06 Total DISK READ :      24.51 M/s | Total DISK WRITE :    1067.07 K/s
05:22:06 Actual DISK READ:      22.92 M/s | Actual DISK WRITE:      10.54 M/s
05:22:07 Total DISK READ :      20.78 M/s | Total DISK WRITE :    1034.70 K/s
05:22:07 Actual DISK READ:      23.04 M/s | Actual DISK WRITE:       6.33 M/s
[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
LL_RW_BLOCK(9)							   The Linux VFS						    LL_RW_BLOCK(9)

NAME
ll_rw_block - level access to block devices (DEPRECATED) SYNOPSIS
void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]); ARGUMENTS
rw whether to READ or WRITE or SWRITE or maybe READA (readahead) nr number of struct buffer_heads in the array bhs[] array of pointers to struct buffer_head DESCRIPTION
ll_rw_block takes an array of pointers to struct buffer_heads, and requests an I/O operation on them, either a READ or a WRITE. The third SWRITE is like WRITE only we make sure that the *current* data in buffers are sent to disk. The fourth READA option is described in the documentation for generic_make_request which ll_rw_block calls. This function drops any buffer that it cannot get a lock on (with the BH_Lock state bit) unless SWRITE is required, any buffer that appears to be clean when doing a write request, and any buffer that appears to be up-to-date when doing read request. Further it marks as clean buffers that are processed for writing (the buffer cache won't assume that they are actually clean until the buffer gets unlocked). ll_rw_block sets b_end_io to simple completion handler that marks the buffer up-to-date (if approriate), unlocks the buffer and wakes any waiters. All of the buffers must be for the same device, and must also be a multiple of the current approved size for the device. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 LL_RW_BLOCK(9)
All times are GMT -4. The time now is 12:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy