service and service status aix ibm

is there anyway to list on aix ibm 5.3 or 6.1. or services installed as part of the OS and their status, i.e. running, disabled, and write the report out to txt file?

i know you can use commands such as # ps -ef |grep smbd for individual services, but with so many it would be easy to get a report in one go.
LVL 4
pma111Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,

let's start with this one.

You can see all configured services and their status with

lssrc -a

For services which control "subservers", such as inetd or syslogd you can run e.g.

lssrc -ls inetd
lssrc -ls syslogd

to see their status.

Services without subservers but which provide statistics, such as sendmail or xntpd, can also be checked with "-ls", e.g.

lssrc -ls sendmail
lssrc -ls xntpd

The above applies to services under control of SRC, the "System Resource Controller".

There are a few services which are started "standalone" via inittab, such as utmpd.
These services can indeed in most cases only be checked with "ps".

Some demons provide their own mechanisms, such as errdemon. Its status can be viewed with

/usr/lib/errdemon -l

wmp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pma111Author Commented:
so lssrc -a >report.txt would write you a file with status?

are the results easy to interpret, i.e. does is have "running" "disabled" type outputs?
0
woolmilkporcCommented:
- Yes
- Yes

Example "lssrc -a":
Subsystem         Group            PID          Status
 xntpd            tcpip            3145854      active
 portmap          portmap          2949256      active
 snmpd            tcpip            3408002      active
 snmpmibd         tcpip            3539052      active
 aixmibd          tcpip            3604724      active
 ypbind           yp               2490508      active
 biod             nfs              4522136      active
 nfsrgyd          nfs              4128900      active
 nfsd             nfs              5701808      active
 rpc.mountd       nfs              5374132      active
 rpc.statd        nfs              3735748      active
 rpc.lockd        nfs              4718772      active
 ...
 lpd              spooler                       inoperative
 ypserv           yp                            inoperative
 ypupdated        yp                            inoperative
 yppasswdd        yp                            inoperative
 keyserv          keyserv                       inoperative
 llbd             iforncs                       inoperative
 glbd             iforncs                       inoperative
 cdromd                                         inoperative
 LUMlmd           lumls                         inoperative
 LUMgdb           lumls                         inoperative
 i4lmd            iforls                        inoperative
 i4glbcd          iforncs                       inoperative
 i4gdb            iforls                        inoperative
 i4llmd           iforls                        inoperative
 muxatmd          tcpip                         inoperative
... 

Open in new window

Example "lssrc -ls inetd":
Subsystem         Group            PID          Status
 inetd            tcpip            19071026     active
Debug         Inactive
Signal        Purpose
 SIGALRM      Establishes socket connections for failed services
 SIGHUP       Rereads configuration database and reconfigures services
 SIGCHLD      Restarts service in case the service dies abnormally
Service       Command                  Arguments                Status
 swat         /opt/pware/sbin/swat     swat                     active
 xmquery      /usr/bin/xmtopas         xmtopas -p3              active
 time         internal                                          active
 daytime      internal                                          active
 time         internal                                          active
 echo         internal                                          active
 ntalk        /usr/sbin/talkd          talkd                    active
 systat       /usr/bin/ps              ps -ef                   active
 bootps       /usr/sbin/bootpd         bootpd /etc/bootptab     active
 login        /usr/sbin/rlogind        rlogind                  active
 shell        /usr/sbin/rshd           rshd                     active
 telnet       /usr/sbin/telnetd        telnetd -a -s            active
 ftps         /usr/sbin/ftpd           ftpd                     active
 ftp          /usr/sbin/ftpd           ftpd                     active

Open in new window

The above "inetd" settings are NOT secure (!), it's just an example.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.