I want to monitor a netstat command as follows:
# netstat -Aan|grep 4800|grep LISTEN
f1000e0017a12bb8 tcp4 0 0 *.4800 *.* LISTEN
So I want the script to run this and if there is a return of "LISTEN" do nothing..
If it returns nothing email alert to...
I had to modify the file because it was grabbing a directory /usr2/HHM/pub/SMM/transfer/request/.more which was the last entry in "ls -ltr"
#!/usr/bin/ksh
# BYIM relect notification
# stephenc@grhc.org
set -x
cd /usr2/HHM/pub/SMM/transfer/request/
DIR="/usr2/HHM/pub/SMM/transfer/request"
#ls...
Thanks,
I added one line for it to work:
#!/usr/bin/ksh
# BYIM relect notification
# stephenc@grhc.org
set -x
cd /usr2/HHM/pub/SMM/transfer/request/ < - - - - - - - - - - - - Added this line
DIR="/usr2/HHM/pub/SMM/transfer/request"
ls -ltr $DIR | tail -1 |awk '{print $9}' |while read i
do...
I need a ksh script that will find the newest file in a directory:
root@phxsa2 in /usr2/HHM/pub/SMM/transfer/request
# ls -t | head -n1|cat
izdata_656701_20140702_64897.rejected.dat
root@phxsa2 in /usr2/HHM/pub/SMM/transfer/request
Then email that file to a specified user:
mail -s " BYIM...
I have a script that authenicates everyone to DB app except for root goes to shell as shown below:
# Added for LikeWise
#######START#######
uid=`id -u`
if [[ $uid != 0 ]];then
> .sh_history
exec csession ENSEMBLE -U HHM "^ZU"
exit
fi
########STOP#######
I need to add more UID's to it now but...
rm /tmp/auth.txt.rpt /tmp/auth.txt
DATE=$(date) # Set DATE equal to the output of running the shell command date
HOSTNAME=$(hostname) # Set HOSTNAME equal to the output of the hostname command
echo "" > /tmp/auth.txt.rpt
echo "" >> /tmp/auth.txt.rpt
echo...
I have a port monitoring script that monitors a port and alerts when it is down. I would like to send a string to a file to build a histogram.
Now I have:
netstat -Aan|grep 4446 1>/dev/null
RC=$?
echo RCb $RC
if [[ ${RC} -eq 1 ]]
then
# echo "Mailing"
mail -s "MIDAS Broker 4446 is...
I need some assistance writing a script to monitor a RPC broker and notify if it is down.
I have a broker that runs on port 9250. When it is up it looks like the following:
# netstat -Aan|grep 9250
f1000e00025863b8 tcp4 0 0 172.16.2.1.9250 172.16.80.40.1185 ESTABLISHED...
I have Active Directory authentication running on my system but I need to setup so that if root logs in you get prompt but if other users via AD login it executes a script in /etc/profile:
> .sh_history
exec csession cache -U HHM "^ZU"
exit
This way all users can run the application and then...
I used to write "endpoint monitoring scripts" for Tivoli Enterprise Console to monitor processes and how long they have been running.
Does anybody know of some way to do the same in Openview (OVO)
I have many servers with hundreds of mounts exported off other servers but one has a strange problem:
1. All the servers start with 90+ mounts to other server exports
2. When I mount 100 more filesystems there is no problem
3. When I mount 150 instead of 100 more filesystems I get an...
That was what smitty showed after I made the lv with smitty, all the rest are on the command line and I figured out what was wrong... We need to use the raw device and destroy the data:
mklv -y' jfsloga' -t' jfs2log' datavg2 1 hdiskpower17
logform -V jfs2 /dev/jfslogb
chfs -a...
We are formatting a jfs2log and are getting the following error:
mklv -y' jfsloga' -t' jfs2log' datavg2 1 hdiskpower17
logform -V jfs2 /dev/jfsloga
stldb2a:root:(/)>chfs -a log=jfsloga /db2_fs23b
chfs: jfsloga is not a jfs2 log type
ANY HELP WOULD BE APPRECIATED
I figured it out!! But thanks for your help!!!
link missing:
A link was missing from (/usr/share/man/info/en_US/a_doc_lib) which could of happened during migration:
Mv /usr/share/man/info/en_US/a_doc_lib/cmds cmds.old
ln -s /opt/ibm_help/eclipse/plugins/com.ibm.aix.doc_5.3.0/cmds cmds...
I figured it out!!
link missing:
A link was missing from (/usr/share/man/info/en_US/a_doc_lib) which could of happened during migration:
Mv /usr/share/man/info/en_US/a_doc_lib/cmds cmds.old
ln -s /opt/ibm_help/eclipse/plugins/com.ibm.aix.doc_5.3.0/cmds cmds
=============
now
=============...
Problem seems to be that it cannot find the standard UNIX command manuals:
dcs1:root:(/mnt1/aix/530/base)>man ls
dcs1:root:(/mnt1/aix/530/base)>
but if I use a file from /usr/share/man/cat1 it works:
dcs1:root:(/usr/share/man/cat1)>ls
agsysdb.1 emcpupgrade.1 i4cfg.1 lb_admin.1...
That is the problem,
dcs1:root:(/)>man ctaman
Manual entry for ctaman not found or not installed.
dcs1:root:(/)>man catman
dcs1:root:(/)>
I can't run the man command to anything. It is like the data files are missing or corrupt but I already copied all over from a good system.
Anything else...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.