[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

service and service status aix ibm

Posted on 2014-02-12
3
Medium Priority
?
2,828 Views
Last Modified: 2014-02-12
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.
0
Comment
Question by:pma111
  • 2
3 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39852868
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
 
LVL 3

Author Comment

by:pma111
ID: 39852870
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
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39852979
- 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question