Search Results

Search: Posts Made By: jaapar
1,057
Posted By Corona688
. /etc/profile ; rest of stuff perhaps.
. /etc/profile ; rest of stuff perhaps.
2,999
Posted By RudiC
If you schedule a command or pipe in cron, the...
If you schedule a command or pipe in cron, the resulting output will be mailed by default, no additional exercises necessary.
2,999
Posted By rovf
So, basically, you want to test, whether a number...
So, basically, you want to test, whether a number containing a decimal point is larger than 600?

If you are using Zsh as a shell, you have decimal arithmetic, and can simply compare the number you...
2,999
Posted By RudiC
Not sure I understand. To monitor, you want that...
Not sure I understand. To monitor, you want that script to run all day, i.e. 24/7? In what intervals? Will iotop allow for that, do you want to loop inside your script, or do you plan to schedule a...
2,999
Posted By RudiC
And where did you fail? BTW, I don't see any...
And where did you fail?

BTW, I don't see any DISK READ above 600MB in your sample?
817
Posted By rbatte1
If you have this as a value in $var, you could...
If you have this as a value in $var, you could also:-echo $var | tr "()" "\n\n" | grep -E "^host="

It's a bit clunky, but might do the job you need.



Robin
817
Posted By RavinderSingh13
Hello jaapar, Could you please try following...
Hello jaapar,

Could you please try following and let me know if this helps you.

awk '{match($0,/HOST=[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/);if(substr($0,RSTART,RLENGTH)){print...
817
Posted By RudiC
If the only criterion were an IP address in...
If the only criterion were an IP address in dotted quad to follow the "HOST=" string, then RavinderSingh13's proposal would work fine, although it might be somewhat too cautious.
awk...
2,477
Posted By RudiC
I can't confirm that "the exit code would always...
I can't confirm that "the exit code would always be 0" :
ssh root@"$server" "grep -q test log$(date +"%m%d")"; echo $?
0
ssh root@"$server" "grep -q txst log$(date +"%m%d")"; echo $?
1

Try ssh...
2,477
Posted By apmcd47
I guess the problem is in your invocation of ssh:...
I guess the problem is in your invocation of ssh:
/usr/bin/ssh "$server" "cat log`date +"%m%d"` | grep test" >/dev/null 2>/dev/null
The | grep test should really be running on your machine rather...
1,387
Posted By Don Cragun
You should be able to simplify that awk code a...
You should be able to simplify that awk code a little bit to just:
20 * * * * df -h | tail +2 | awk '($5 + 0) > 98' | mailx -s "Email Subject" <email address>
but on a Solaris/SunOS system, that...
1,387
Posted By lightman66
I think you can just set a cronjob to run at your...
I think you can just set a cronjob to run at your preferred interval.

mine is running on solaris 10 hence command might varies.

20 * * * * df -h | tail +2 | awk '{if ((length($5) > 3) ||...
1,387
Posted By RudiC
Almost certainly, yes. Look into the links at the...
Almost certainly, yes. Look into the links at the lower left of this page, under "More UNIX and Linux Forum Topics You Might Find Helpful", or search these fora for "almost full".
Forum: AIX 02-01-2017
7,188
Posted By rbatte1
The problem you may have is that the logical...
The problem you may have is that the logical volumes in the volume group will probably be using it as their log volume. I'm not sure how it's still running if the disk blocks for the log volume are...
Forum: AIX 02-01-2017
7,188
Posted By agent.kgb
1. unmount /usr/local (I think this is the...
1. unmount /usr/local (I think this is the filesystem using loglv00 as logging device. In doubt you can try to find it using grep -p /dev/loglv00 /etc/filesystems).
2. remove loglv00
3. remove...
955
Posted By bakunin
Just a minor addition: i'd call the ssh-facility...
Just a minor addition: i'd call the ssh-facility this way to prevent problems in case keys are changed/deleted. Not allocating a terminal (-n) prevents problems when used inside pipelines:
...
955
Posted By drysdalk
Hi, A script like this set up on ServerA...
Hi,

A script like this set up on ServerA should do the trick.


#!/bin/bash
date=`/bin/date +%Y%m%d%H%M%S`

email_to="unixforum@localhost"
email_subject="Something went wrong"...
3,047
Posted By RudiC
This would work except for the missing separator...
This would work except for the missing separator line of the last record...paste -sd"\t\t\t\n" file1 | LC_ALL=C sort -k2,2gr | tr '\t' '\n'
user10 31.7 0.08 ...
Showing results 1 to 18 of 18

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