10-16-2013
Thanks for the reply.
It needs to be done to the stream coming from tail -f, not a file.
I have tried appending that at the end but it doesn't work either...
Edit-
Also, this needs to be done "on the fly" because I have to measure the time while this is done.
Thanks.
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I've a structure let's say
typdef struct a { int a; int b; char* string} b;
I need to make the function smth like readdir(), returning everytime it's called pointer to the next structure. Let's say functions would read the next file in the directory and all the permitions put it in... (2 Replies)
Discussion started by: solvman
2 Replies
2. UNIX for Dummies Questions & Answers
Hello
I wander if im doing :
ls -l and its giving me lets say 3 results :
-rw-r--r-- 1 blah other 1789 May 19 2003 foo.c
-rw-r--r-- 1 blah other 1014 May 19 2003 foo.h
-rw-r--r-- 1 blah other 270 May 19 2003 foo1.c
now I would like to use the first... (1 Reply)
Discussion started by: umen
1 Replies
3. Shell Programming and Scripting
Hello,
i am trying to write a script file in awk which yields me the number of lines,characters and words, i checked it many many times but i am not able to find any mistake in it. Please tell me where i went wrong.
BEGIN{
print "Filename Lines Words Chars\n"
}
{
filename=filename + 1... (2 Replies)
Discussion started by: salman4u
2 Replies
4. Shell Programming and Scripting
Please help in the following problem:
Input is:
Pritam
123
456
Patil
myname
youname
Pritam
myproject
thisproject
iclic
Patil
remaining text
some more text
I need the command which will display the no of lines between two words in the whole file.
e.g. Display all the no of lines... (5 Replies)
Discussion started by: zsudarshan
5 Replies
5. Shell Programming and Scripting
hello,
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies
6. Shell Programming and Scripting
Hi everybody,
i have this biological situation to fix:
> Id.1
ACGTACANNNNNNNNNNNACGTGCNNNNNNNACTGTGGT
>Id.2
ACGGGT
>Id.3
ACGTNNNNNNNNNNNNACTGGGGG
>Id.4
ACGTGCGNNNNNNNNGGTCANNNNNNNNCGTGCAAANNNNN
........
....
These are nucleotidic sequences with some "NNNN..." always of the same... (4 Replies)
Discussion started by: Giorgio C
4 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement to to an ldapsearch and remove the shadow attributes in the output file.
What I do is ldapsearch() | operation to remove shadow > FILE
The ldapsearch gives output like this(with same line formation):
objectClass: FSConfig
objectClass: extensibleObject
fsCAIP:... (10 Replies)
Discussion started by: lorzinian
10 Replies
8. UNIX for Dummies Questions & Answers
Hey everyone!
I have a tab delimited data set which I want to create an output contained the calculation of number of those lines with a certain value in 2nd and 3rd column.
my input file is like this:
ID1 1 10M AAATTTCCGG
ID2 5 4M ACGT
ID3 5 8M ACCTTGGA
ID4 5 ... (7 Replies)
Discussion started by: @man
7 Replies
9. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
10. Shell Programming and Scripting
Is there an efficient awk that can count the number of lines that occur in between two tags.
For instance, consider the following text:
<s>
Hi PP -
my VBD -
name DT -
is NN -
. SENT .
</s>
<s>
Her PP -
name VBD -
is DT -
the NN -
same WRT -
. SENT -
</s>
I am interested to know... (4 Replies)
Discussion started by: owwow14
4 Replies
LEARN ABOUT SUSE
mrtg-squid
MRTG-SQUID(1) mrtg MRTG-SQUID(1)
NAME
mrtg-squid - using mrtg to monitor Squid
DESCRIPTION
Squid 2.3 knows SNMP and you can therefore use mrtg to monitor it quite easily.
I have made some modifications to mrtg which simplify this. My work is based on earlier modification made by: matija.grabnar@arnes.si and
kostas@nlanr.net.
MODIFICATIONS
I added new code for displaying correct units to the previous patches "perminute" and "perhour" ("option" tokens), which allows other mea-
surement in addition to "persecond".
Then I created a new option token "dorelpercent" which allows the calculation of the percentage of IN-stream / OUT-stream on the fly and
then displays it on a fixed scale from 0% to 100%. For my requirements, this does good work. Maybe someone wants a floating scale. It
should not be a problem to implement it, too (but give me an option to keep my fixed scale). If IN-stream is always less than OUT-stream
both lines (OUT-stream and relative percent) are always displayed on top of IN-stream bulk. Otherwise this option makes no sense. With this
option you can display hitrates, errorrates (for router monitoring: rel. droprates) easily now.
If you use this options please consider that you need a 5th colourname/value pair in your Colours statements!
Due to some discussion on this list, I have implemented two tokens too:
"kilo" and "kMG"
"kilo" should contain the value of k (1000 or 1024), where 1000 is the default.
"kMG" is a comma separated list of multiplier prefixes, used instead of "", "k", "M", "G", "T" on the MRTG display. Leave the place free,
if you want no prefix.
Also an incomplete list of OIDs for the new SQUID release is added.
I hope you enjoy it.
CONFIG EXAMPLE
You can measure responsetimes in ms and display it with MRTG correctly with:
kMG[measure-ms]: m,,k,M,G,T
short[measure-ms]: s
You can display now MB/s as 1024*1024 B/s with:
kilo[volume]: 1024
A sample config for squid:
Target[proxy-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@proxy
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]: <H2>proxy Cache Statistics: HTTP Hits / Requests</H2>
Suppress[proxy-hit]: y
LegendI[proxy-hit]: HTTP hits
LegendO[proxy-hit]: HTTP requests
Legend1[proxy-hit]: HTTP hits
Legend2[proxy-hit]: HTTP requests
YLegend[proxy-hit]: perminute
ShortLegend[proxy-hit]: req/min
Options[proxy-hit]: nopercent, perminute, dorelpercent
Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@proxy
Title[proxy-srvkbinout]: Cache Server Traffic In / Out
PageTop[proxy-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out) </H2>
Suppress[proxy-srvkbinout]: y
LegendI[proxy-srvkbinout]: Traffic In
LegendO[proxy-srvkbinout]: Traffic Out
Legend1[proxy-srvkbinout]: Traffic In
Legend2[proxy-srvkbinout]: Traffic Out
YLegend[proxy-srvkbinout]: per minute
ShortLegend[proxy-srvkbinout]: b/min
kMG[proxy-srvkbinout]: k,M,G,T
kilo[proxy-srvkbinout]: 1024
Options[proxy-srvkbinout]: nopercent, perminute
AUTHOR
Andreas Papst <andreas.papst@univie.ac.at> Dirk-Luder Kreie <deelkar@gmx.de>
2.16.2 2008-05-16 MRTG-SQUID(1)