grep -v 13 zeros in a string


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting grep -v 13 zeros in a string
# 8  
Old 07-29-2012
Mark:

I am looking for the cause or clue of what my clients reports as an issue for him.
He has an AWS Instance that was Ubu 9.04, so we upgraded his Instance to 12.04 LTS.
This cloning process included an upgrade of MySQL and MongoDB,

Client's description in red...

Since this upgrade, he reports that he sees in htop a CPU (there's 8 CPUs) spike of anywhere from 1 or 2 CPUs that lasts for "several seconds" where the IO field entries are working pretty hard.
"The io-wait happens very frequently. I suppose I can stare at HTOP for a while to see how often, but I'm guessing about every 5 minutes (big guess). "
and
"ok. Let me watch.... there it goes. I've attached a screenshot that shows 2 CPU's going into io-wait (there were actually 3 at one point). This went on for about 7 seconds. My knee-jerk reaction is ‘it's mongo', because the IO in htop (sorted by IO) is the highest. However, that value is really no higher (and even lower) than other values when there is no io-wait happening. So I think it's something that's writing to disk, but not much data (so low IO because of all of the waiting" says the client.

So since I also would suspect mongod, I fire up "htop -u mongodb" and seems accurate.
I've also ran "htop -u mongodb -s IO_WRITE_RATE" and witnessed similar activity.

so, the trail I am following thus far, is...
Code:
dbpath=/mnt/data-indexes/mongodb
/dev/md1       xfs     50G   29G   22G  57% /mnt/data-indexes
ARRAY /dev/md1 level=raid0 devices=/dev/sdj,/dev/sdk

The usual sysstat tools installed and I usually check sar data but that only collects every 10m, so I installed collectl

And this is my DaemonCommands entry since I modified it to slice up my task by the Hour.
Code:
DaemonCommands = -f /var/log/collectl -r00:00,7,60 -m -F60 -s+YZ

The last thing I ran is
Code:
collectl --procfilt $(pidof mongod) --dskopts z -sD --dskfilt sd[jk] -oT --headerrepeat 100 -R 1d >> mongod_playback.out

and that shows Pct as hitting "100" 3681 times.

Why I use --hr 100? It looked "better" on screen to be honest. Smilie

Thank you for your time.
I appreciate it.

Last edited by Habitual; 07-29-2012 at 07:04 PM..
# 9  
Old 07-29-2012
actually one other thing I just spotted, it you want to filter on a pid, you need to preface the number with a 'p'.
-mark
# 10  
Old 07-29-2012
both
Code:
--procfilt -p $(pidof mongod)
--procfilt $(pidof mongod)

both seem to put out identical data...?

and most importantly, (I just noticed also)
Code:
collectl V3.6.0-1 (zlib:2.033,HiRes:1.972101)

Thank you,

JJ of c9
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep a string and count following lines starting with another string

I have a large dataset with following structure; C 0001 Carbon D SAR001 methane D SAR002 ethane D SAR003 propane D SAR004 butane D SAR005 pentane C 0002 Hydrogen C 0003 Nitrogen C 0004 Oxygen D SAR011 ozone D SAR012 super oxide C 0005 Sulphur D SAR013... (3 Replies)
Discussion started by: Syeda Sumayya
3 Replies

2. Shell Programming and Scripting

Grep string in files and list file names that contain the string

Hi, I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat. My OS is: SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies

3. Shell Programming and Scripting

grep exact string from files and write to filename when string present in file

I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies

4. Shell Programming and Scripting

Grep a string from input file and delete next three lines including the line contains string in xml

Hi, 1_strings file contains $ cat 1_strings /home/$USER/Src /home/Valid /home/Review$ cat myxml <projected value="some string" path="/home/$USER/Src"> <input 1/> <estimate value/> <somestring/> </projected> <few more lines > <projected value="some string" path="/home/$USER/check">... (4 Replies)
Discussion started by: greet_sed
4 Replies

5. Shell Programming and Scripting

Grep a string and write a value to next line of found string

Hi, I have two variables x and y. i need to find a particular string in a file, a workflow name and then insert the values of x and y into the next lines of the workflow name. basically it is like as below wf_xxxxxx $$a= $$b= $$c= figo $$d=bentley i need to grep the 'wf_xxxx' and then... (6 Replies)
Discussion started by: angel12345
6 Replies

6. Shell Programming and Scripting

grep on string and printing line after until another string has been found

Hello Everyone, I just started scripting this week. I have no background in programming or scripting. I'm working on a script to grep for a variable in a log file Heres what the log file looks like. The x's are all random clutter xxxxxxxxxxxxxxxxxxxxx START: xxxxxxxxxxxx... (7 Replies)
Discussion started by: rxc23816
7 Replies

7. Shell Programming and Scripting

Grep for a string and then grep using a string from that result

Hello, Thanks in advance for the query. There is a log file abcd.log which has multible line like this. "hello1" , "hello2", "hello3" , "hello4" , "hello5" I want to grep for the lines which has "hello4" & "hello5" and use "hello2" to grep the same log file again. All these should... (8 Replies)
Discussion started by: kzenthil
8 Replies

8. UNIX for Dummies Questions & Answers

| help | unix | grep - Can I use grep to return a string with exactly n matches?

Hello, I looking to use grep to return a string with exactly n matches. I'm building off this: ls -aLl /bin | grep '^.\{9\}x' | tr -s ' ' -rwxr-xr-x 1 root root 632816 Nov 25 2008 vi -rwxr-xr-x 1 root root 632816 Nov 25 2008 view -rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies

9. Shell Programming and Scripting

Grep a string and print a string from the line below it

I know how to grep, copy and paste a string from a line. Now, what i want to do is to find a string and print a string from the line below it. To demonstrate: Name 1: ABC Age: 3 Sex: Male Name 2: DEF Age: 4 Sex: Male Output: 3 Male I know how to get "3". My biggest problem is to... (4 Replies)
Discussion started by: kingpeejay
4 Replies

10. Shell Programming and Scripting

Remove O and preceeding zeros in a string

Hi all, Can anybody help me out to write a program in perl to remove O and preceeding zeros. for eg input is O0000123089 - output 123089 Thanks Mahalakshmi.A (10 Replies)
Discussion started by: mahalakshmi
10 Replies
Login or Register to Ask a Question