Search Results

Search: Posts Made By: msullivan
3,222
Posted By msullivan
I figured it out! :D Just had to change the...
I figured it out! :D Just had to change the stupid quotes...

Now the script goes helluva fast and only uses around 0.6-0.8% Utilization, compared to 14% if the gunzip filename does not match...
3,222
Posted By msullivan
Thanks for the reply Jim. The nice command...
Thanks for the reply Jim.

The nice command does work very..um.. nicely..
The problem I have is that I am not allowed to place any files on the servers I have to monitor. I am sitting in...
3,222
Posted By msullivan
ssh command headache
Good day,

I am trying to run a ssh command on a remote server, but when I run the command the server takes FOREVER... and ends up giving me an error..
then the script also kicks server load up by...
4,788
Posted By msullivan
I wish I could put it in a file... but I'm too...
I wish I could put it in a file... but I'm too lazy to do that....
but I did get rid of the cat though... and tada! some fancy escape work:

Servername=cre02 ; ServerIP=10.113.98.17;ssh...
4,788
Posted By msullivan
As much fun as it is to see this work on a...
As much fun as it is to see this work on a server, I am trying to figure out how to get his working in a ssh command.

ssh readonly@100.100.100.1 'for t in 00 01 02 03 04 05 06 07 08 09 10 11 12 13...
4,788
Posted By msullivan
Thanks, I'll go have a look at the user's guide. ...
Thanks, I'll go have a look at the user's guide.
:D:D:D
Thanks you so very much ripat. I came right.

for t in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23; do echo...
2,536
Posted By msullivan
Almost working #!/usr/bin/ksh for i in 00 01...
Almost working
#!/usr/bin/ksh
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31;
do

#######
DAYS_AGO=$i
DAY=`date +%d`
LMONTH=`date...
2,536
Posted By msullivan
You need to: - find all files older than 30...
You need to:
- find all files older than 30 days?
- sort them from the oldest to newest?
- what do you want to do with the list of files?
4,788
Posted By msullivan
I changed the awk command to: awk '{total[$10]...
I changed the awk command to:
awk '{total[$10] += 1} END{for (i in total) print "HTTP/1.1 "i, total[i]}'
and output is:
HTTP/1.1 304 591
HTTP/1.1 503 24
HTTP/1.1 404 402
HTTP/1.1 200 21480...
4,788
Posted By msullivan
Superb!! Thanks ripat! I goes to about 3.5% CPU...
Superb!! Thanks ripat!
I goes to about 3.5% CPU Utilization, but finishes in about 15 seconds, which is fair game for me.

Output:
502 3
304 1359
503 88
404 467
200 31817
500 301
302 207
...
4,788
Posted By msullivan
Thanks :) I will have a look
Thanks :) I will have a look
4,788
Posted By msullivan
This is sample input: 10.113.98.16...
This is sample input:
10.113.98.16 10.113.155.52 - - [02/Mar/2009:09:00:01 +0200] "GET /mi_icons/misc/png240/divider.png HTTP/1.1" 200 227 "http://live.vo
dafone.com/!1GjhKhab-irZoHNZX3giab"...
2,536
Posted By msullivan
Here is a start, first figure out when was 30...
Here is a start, first figure out when was 30 days ago..

#!/usr/bin/ksh
DAYS_AGO=30
DAY=`date +%d`
LMONTH=`date +%b`
MONTH=`date +%m`
YEAR=`date +%Y`
DAY_1=`expr "$DAY" - $DAYS_AGO`

if [...
4,788
Posted By msullivan
Count occurances of X Y Z in a file in 1 go.
Hi. I need to count multiple occurrences of X Y Z in a file in 1 go. At the moment I have the following scripts:
ssh readonly@$ServerIP 'YEAR=xx;DAY=xx;MONTH=xx;LMONTH=xx;for i in 00 01 02 03 04 05...
3,275
Posted By msullivan
Thanks Perderabo...
Thanks Perderabo (https://www.unix.com/members/3394.html)
I tested the scripts and they work like a charm.. Now I just have to deal with output redirect... I'm sure >>$logFile 2>&1 & will do the...
3,275
Posted By msullivan
But if I make it a solid background process... ...
But if I make it a solid background process...
Servername="A"; serverip=1.1.1.1 ; sshfunction &

Will that put all the functions in sshfunction() at the same time in the background?
As I have...
3,275
Posted By msullivan
stagger ssh command to multiple machines
Good day,

I am extracting information from Apache log files from 41 servers. Every day I have 7 cronjobs scheduled to do this for me and it works beautifully :D... only problem is that it takes...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy