Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. sjcrane

    Need help creating ksh script

    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...
  2. sjcrane

    KSH script please help

    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...
  3. sjcrane

    KSH script please help

    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...
  4. sjcrane

    KSH script please help

    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...
  5. sjcrane

    AIX KSH script needs modification

    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...
  6. sjcrane

    KSH Script error &quot;./auth_report.ksh[28]: syntax error at line 35 : `&quot;' unmatched&quot;

    Sorry, Found the issue and is now resolved: Before: echo "=======================================" >> /tmp/auth.txt.rpt echo "Report Completed " >>/tmp/auth.txt.rpt" >> /tmp/auth.txt.rpt echo "======================================" >> /tmp/auth.txt.rpt After: echo...
  7. sjcrane

    KSH Script error &quot;./auth_report.ksh[28]: syntax error at line 35 : `&quot;' unmatched&quot;

    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...
  8. sjcrane

    Port monitor script

    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...
  9. sjcrane

    Broker monitor script with notification

    FYI AIX6.1 KSH
  10. sjcrane

    Broker monitor script with notification

    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...
  11. sjcrane

    Need if/then statement in /etc/profile

    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...
  12. sjcrane

    Open View Endpoint scripts

    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)
  13. sjcrane

    limit to number of mounts

    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...
  14. sjcrane

    log form and chfs error

    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...
  15. sjcrane

    log form and chfs error

    Also FYI, I answered "NO" to logform -V jfs2 /dev/jfsloga logform /dev/jfsloga logform: destroy /dev/rjfsloga (y)?n
  16. sjcrane

    log form and chfs error

    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
  17. sjcrane

    AIX man pages fail

    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...
  18. sjcrane

    AIX man pages fail

    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 =============...
  19. sjcrane

    AIX man pages fail

    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...
  20. sjcrane

    AIX man pages fail

    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...

Part and Inventory Search

Back
Top