AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
#Operatingsystems
#Servers
 View Only
  • 1.  Issue to run programs on AIX

    Posted 05/09/08 02:00 PM

    Originally posted by: twbernardes


    Whatever command I try to run on AIX I need to put "sh" before. Ex: if I run just "smit" I get "ksh: smit: not found", but running "sh smit", it works!

    The problem is: I need to install a fixpack for a Websphere product, and the program(setupaix) I have been using for that runs ANOTHER program, which is /usr/sbin/extendlv. So since this ANOTHER program is called by setupaix, I'm unable to put sh before.

    Note. These programs are installed on my server, and I also tried to run then from root directory, but did not work.

    Any idea about what I need to do to resolve that (run execs without sh before)? Do I need to set something in the path?
    #AIX-Forum


  • 2.  Re: Issue to run programs on AIX

    Posted 05/09/08 02:28 PM

    Originally posted by: SystemAdmin


    It sounds like your PATH environment variable is hosed. I would take a look at the current PATH variable is set to...

    On a minimal install as root I see this:
    
    # echo $PATH /:.:/bin:/usr/bin:
    

    You definitely want the path to point to where common commands are installed, such as smit which is in /bin.

    Message was edited by: bfveale

    Message was edited by: bfveale
    #AIX-Forum


  • 3.  Re: Issue to run programs on AIX

    Posted 05/09/08 03:13 PM

    Originally posted by: twbernardes


    server>echo $PATH
    /usr/bin:/etc:/usr/sbin

    So it should work for smit, right? But it's not!
    #AIX-Forum


  • 4.  Re: Issue to run programs on AIX

    Posted 05/09/08 03:39 PM

    Originally posted by: SystemAdmin


    What does the following command return?
    
    which smit

    it should return:
    
    # which smit
    /bin/smit

    #AIX-Forum


  • 5.  Re: Issue to run programs on AIX

    Posted 05/09/08 03:55 PM

    Originally posted by: twbernardes


    Yes, I had checked that. That's correct too.

    server>which smit
    /usr/bin/smit

    Thanks.

    Thiago
    #AIX-Forum


  • 6.  Re: Issue to run programs on AIX

    Posted 05/09/08 11:19 PM

    Originally posted by: orphy


    A couple more ideas. What does 'lsuser <user>' show? What happens if you run smit using full path? Do you have problem with all other commands or only certain commands? What if you write a tiny little script of your own and try running it? Does it give you the same ksh error?

    Otherwise, the basics have been checked and they look fine so I suggest opening a PMR with AIX Support. They might be able to get a snap and look at your environment which seems to be messed up. Please post the resolution here so we all benefit from it. Thanks.
    Orphy
    #AIX-Forum


  • 7.  Re: Issue to run programs on AIX

    Posted 05/13/08 09:32 AM

    Originally posted by: twbernardes


    Here is what I have done to fix that:

    Somehow I lost some links that point to where the commands reside. I had the path set, but I needed those links to be able to execute the commands.

    Ex:
    On / I looked for bin and cannot find, so I ran:
    1. ln -s /usr/bin /bin

    After that I ran:
    1. lppchk -l
    Got this:
    lppchk: No link found from /lib to /usr/lib.
    lppchk: No link found from /u to /home.

    Then I ran:
    ln -s /usr/lib /lib
    ln -s /home /u

    Just that!

    Thanks for the responses anyway.

    Thiago
    #AIX-Forum