Results 1 to 6 of 6

Thread: script of useful commands

  1. #1
    Member
    Join Date
    Aug 2003
    Location
    Wellingborough, Northants
    Posts
    158
    Thanks
    7
    Thanked
    0 times in 0 posts

    script of useful commands

    Does anyone know how I can write a script in AIX to group together useful health-check commands like df -k, lssrc -a, ps -eaf | grep informix, ipcs -mt, netstat -i, lpstat ??




    Cheers

    Rob
    The older I get, the faster I was.

  2. #2
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Erm, just stick them in a file and make the file executable...

    So make a file (in vi or emacs or whatever) and list them line by line so:

    Code:
    df -k
    lssrc -a
    ps -eaf | grep informix
    ipcs -mt
    netstat -i lpstat
    Then make the file executable:

    chmod u+x <filename>

    then run it with ./<filename> or stick it in your PATH and just run it with the filename. Should work.
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  3. #3
    Member
    Join Date
    Aug 2003
    Location
    Wellingborough, Northants
    Posts
    158
    Thanks
    7
    Thanked
    0 times in 0 posts
    Thanks v much, it works a treat. Can you explain how to add to PATH though........


    How do create your sig pics?


    Cheers
    Rob
    The older I get, the faster I was.

  4. #4
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    To add it to the PATH, it depends what shell you are running. I've not used AIX before...If you finger yourself it should tell you, so:

    finger <username>

    If it's bash, you need to edit your .bash_profile and add

    export PATH=$PATH:<full path to script>

    so if the script is in /home/robbiehall/scripts you need to add

    export PATH=$PATH:/home/robbiehall/scripts

    If you are using another shell, it's probably a matter of editing .profile, but it would depend on the shell.

    My sig image - you mean how did I create the actual image, or how did you get the forum to display it?
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  5. #5
    Member
    Join Date
    Aug 2003
    Location
    Wellingborough, Northants
    Posts
    158
    Thanks
    7
    Thanked
    0 times in 0 posts

    Talking

    Well both I spose...

    I mean I guess you use photoshop or similar to manipulate the images..what are the optimum sizes w.h.y. ?

    and yes how does the forum display it...?

    is it then necessary to upload to my website, or their own web space, or simply paste into a signature box somewhere in my profile?

    Ceers

    Rob
    The older I get, the faster I was.

  6. #6
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Yeah. er, just use paint shop pro or whatever to make the image. Make it small kbytes wise and ensure that the dimensions are no bigger than anyone elses, then upload it to your webspace. Then you can just edit your profile and do something like:

    [ img ]http://www.bennyr.pwp.blueyonder.co.uk/sig.gif[/ img ]

    (Take the spaces out of the IMG tags tho - I had to add them in to stop the forum displaying an image...
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •