1.# svcs -a
显示系统上所有的服务及其它们的状态.
bash-3.00# svcs -a
STATE STIME FMRI
legacy_run Feb_14 lrc:/etc/rcS_d/S29wrsmcfg
legacy_run Feb_14 lrc:/etc/rc2_d/S10lu
legacy_run Feb_14 lrc:/etc/rc2_d/S20sysetup
legacy_run Feb_14 lrc:/etc/rc2_d/S40llc2
legacy_run Feb_14 lrc:/etc/rc2_d/S42ncakmod
legacy_run Feb_14 lrc:/etc/rc2_d/S45vxpbx_exchanged
legacy_run Feb_14 lrc:/etc/rc2_d/S47pppd
legacy_run Feb_14 lrc:/etc/rc2_d/S70uucp
legacy_run Feb_14 lrc:/etc/rc2_d/S72autoinstall
legacy_run Feb_14 lrc:/etc/rc2_d/S73cachefs_daemon
legacy_run Feb_14 lrc:/etc/rc2_d/S77netbackup
legacy_run Feb_14 lrc:/etc/rc2_d/S81dodatadm_udaplt
legacy_run Feb_14 lrc:/etc/rc2_d/S89PRESERVE
legacy_run Feb_14 lrc:/etc/rc2_d/S89bdconfig
legacy_run Feb_14 lrc:/etc/rc2_d/S90loc_ja_cssd
legacy_run Feb_14 lrc:/etc/rc2_d/S91afbinit
legacy_run Feb_14 lrc:/etc/rc2_d/S91gfbinit
legacy_run Feb_14 lrc:/etc/rc2_d/S91ifbinit
legacy_run Feb_14 lrc:/etc/rc2_d/S91jfbinit
legacy_run Feb_14 lrc:/etc/rc2_d/S91kfbinit
legacy_run Feb_14 lrc:/etc/rc2_d/S91zuluinit
legacy_run Feb_14 lrc:/etc/rc2_d/S94ncalogd
legacy_run Feb_14 lrc:/etc/rc2_d/S95nbclient
legacy_run Feb_14 lrc:/etc/rc2_d/S98deallocate
legacy_run Feb_14 lrc:/etc/rc2_d/S99ITMAgents1
disabled Feb_14 svc:/system/metainit:default
disabled Feb_14 svc:/system/device/mpxio-upgrade:default
disabled Feb_14 svc:/network/ipsec/ike:default
disabled Feb_14 svc:/network/ipsec/manual-key:default
disabled Feb_14 svc:/network/ipfilter:default
disabled Feb_14 svc:/network/rpc/keyserv:default
disabled Feb_14 svc:/network/rpc/nisplus:default
disabled Feb_14 svc:/network/nis/server:default
disabled Feb_14 svc:/network/nis/client:default
disabled Feb_14 svc:/network/dns/client:default
disabled Feb_14 svc:/network/ldap/client:default
disabled Feb_14 svc:/application/print/server:default
disabled Feb_14 svc:/platform/sun4u/sckmd:default
disabled Feb_14 svc:/platform/sun4u/dscp:default
disabled Feb_14 svc:/platform/sun4u/sf880drd:default
disabled Feb_14 svc:/system/auditd:default
disabled Feb_14 svc:/system/mdmonitor:default
disabled Feb_14 svc:/system/patch-finish:delete
disabled Feb_14 svc:/system/pools:default
disabled Feb_14 svc:/system/rcap:default
disabled Feb_14 svc:/system/vxfs/fsdedupschd:default
disabled Feb_14 svc:/network/rpc/bootparams:default
disabled Feb_14 svc:/network/samba:default
disabled Feb_14 svc:/network/winbind:default
disabled Feb_14 svc:/network/wins:default
disabled Feb_14 svc:/network/nfs/server:default
disabled Feb_14 svc:/network/rarp:default
disabled Feb_14 svc:/network/dhcp-server:default
disabled Feb_14 svc:/application/management/webmin:default
disabled Feb_14 svc:/application/database/postgresql:version_82
disabled Feb_14 svc:/application/database/postgresql:version_82_64bit
disabled Feb_14 svc:/application/database/postgresql_83:default_32bit
disabled Feb_14 svc:/application/gdm2-login:default
disabled Feb_14 svc:/application/database/postgresql_83:default_64bit
disabled Feb_14 svc:/application/wnn8/server:default
disabled Feb_14 svc:/network/routing/zebra:quagga
disabled Feb_14 svc:/network/routing/rdisc:default
disabled Feb_14 svc:/network/routing/ripng:default
disabled Feb_14 svc:/network/routing/ripng:quagga
disabled Feb_14 svc:/network/dns/server:default
disabled Feb_14 svc:/milestone/patching:default
disabled Feb_14 svc:/system/prepatch:default
disabled Feb_14 svc:/network/routing/legacy-routing:ipv6
disabled Feb_14 svc:/network/ipv4-forwarding:default
disabled Feb_14 svc:/network/routing/rip:quagga
disabled Feb_14 svc:/network/routing/ospf:quagga
disabled Feb_14 svc:/network/routing/ospf6:quagga
disabled Feb_14 svc:/network/routing/bgp:quagga
disabled Feb_14 svc:/application/database/postgresql:version_81
disabled Feb_14 svc:/network/routing/legacy-routing:ipv4
disabled Feb_14 svc:/network/routing/ndp:default
disabled Feb_14 svc:/network/ipv6-forwarding:default
disabled Feb_14 svc:/network/routing/route:default
disabled Feb_14 svc:/network/tnd:default
disabled Feb_14 svc:/network/security/kadmin:default
disabled Feb_14 svc:/network/security/krb5kdc:default
disabled Feb_14 svc:/network/ipmievd:default
disabled Feb_14 svc:/network/http:apache2
disabled Feb_14 svc:/network/apocd/udp:default
disabled Feb_14 svc:/network/nis/passwd:default
disabled Feb_14 svc:/network/nis/update:default
disabled Feb_14 svc:/network/nis/xfr:default
disabled Feb_14 svc:/network/ntp4:default
disabled Feb_14 svc:/network/slp:default
disabled Feb_14 svc:/platform/sun4u/dcs:default
disabled Feb_14 svc:/platform/sun4u/oplhpd:default
disabled Feb_14 svc:/platform/sun4u/efdaemon:default
disabled Feb_14 svc:/platform/sun4v/efdaemon:default
disabled Feb_14 svc:/system/consadm:default
disabled Feb_14 svc:/system/labeld:default
disabled Feb_14 svc:/system/pools/dynamic:default
disabled Feb_14 svc:/system/tsol-zones:default
disabled Feb_14 svc:/system/sar:default
disabled Feb_14 svc:/system/iscsitgt:default
disabled Feb_14 svc:/system/cvc:default
disabled Feb_14 svc:/system/sfmh-discovery:default
disabled Feb_14 svc:/network/rpc/meta:default
disabled Feb_14 svc:/application/x11/xvnc-inetd:default
disabled Feb_14 svc:/network/rpc/mdcomm:default
disabled Feb_14 svc:/network/rpc/metamed:default
disabled Feb_14 svc:/network/rpc/metamh:default
disabled Feb_14 svc:/network/rpc/ocfserv:default
disabled Feb_14 svc:/network/rpc/rex:default
disabled Feb_14 svc:/network/rpc/spray:default
disabled Feb_14 svc:/network/rpc/wall:default
disabled Feb_14 svc:/network/security/krb5_prop:default
disabled Feb_14 svc:/network/swat:default
disabled Feb_14 svc:/network/tname:default
disabled Feb_14 svc:/network/uucp:default
disabled Feb_14 svc:/network/chargen:dgram
disabled Feb_14 svc:/network/chargen:stream
disabled Feb_14 svc:/network/daytime:dgram
disabled Feb_14 svc:/network/daytime:stream
disabled Feb_14 svc:/network/discard:dgram
disabled Feb_14 svc:/network/discard:stream
disabled Feb_14 svc:/network/echo:dgram
disabled Feb_14 svc:/network/echo:stream
disabled Feb_14 svc:/network/time:dgram
disabled Feb_14 svc:/network/time:stream
disabled Feb_14 svc:/network/comsat:default
disabled Feb_14 svc:/network/login:eklogin
disabled Feb_14 svc:/network/login:klogin
disabled Feb_14 svc:/network/rexec:default
disabled Feb_14 svc:/network/shell:kshell
disabled Feb_14 svc:/network/talk:default
online Feb_14 svc:/system/svc/restarter:default
online Feb_14 svc:/network/pfil:default
online Feb_14 svc:/network/tnctl:default
online Feb_14 svc:/network/loopback:default
online Feb_14 svc:/system/installupdates:default
online Feb_14 svc:/milestone/name-services:default
online Feb_14 svc:/network/physical:default
online Feb_14 svc:/system/identity:node
online Feb_14 svc:/system/vxvm/vxvm-sysboot:default
online Feb_14 svc:/system/filesystem/root:default
online Feb_14 svc:/system/scheduler:default
online Feb_14 svc:/system/boot-archive:default
online Feb_14 svc:/system/vxvm/vxvm-startup1:default
online Feb_14 svc:/system/vxvm/vxvm-shutdown:default
online Feb_14 svc:/system/filesystem/usr:default
online Feb_14 svc:/system/keymap:default
online Feb_14 svc:/system/device/local:default
online Feb_14 svc:/system/filesystem/minimal:default
online Feb_14 svc:/system/identity:domain
online Feb_14 svc:/system/resource-mgmt:default
online Feb_14 svc:/system/name-service-cache:default
online Feb_14 svc:/system/sysevent:default
online Feb_14 svc:/system/coreadm:default
online Feb_14 svc:/system/rmtmpfiles:default
online Feb_14 svc:/system/device/fc-fabric:default
online Feb_14 svc:/system/cryptosvc:default
online Feb_14 svc:/system/picl:default
online Feb_14 svc:/network/ipsec/ipsecalgs:default
online Feb_14 svc:/network/ipsec/policy:default
online Feb_14 svc:/milestone/network:default
online Feb_14 svc:/system/power:default
online Feb_14 svc:/network/initial:default
online Feb_14 svc:/network/service:default
online Feb_14 svc:/application/print/ppd-cache-update:default
online Feb_14 svc:/network/iscsi/initiator:default
online Feb_14 svc:/system/pkgserv:default
online Feb_14 svc:/network/ntp:default
online Feb_14 svc:/system/manifest-import:default
online Feb_14 svc:/system/patchchk:default
online Feb_14 svc:/system/vxvm/vxvm-startup2:default
online Feb_14 svc:/milestone/devices:default
online Feb_14 svc:/milestone/single-user:default
online Feb_14 svc:/system/vxvm/vxvm-reconfig:default
online Feb_14 svc:/system/vxvm/vxnm-vxnetd:default
online Feb_14 svc:/system/vxvm/vxrsyncd:default
online Feb_14 svc:/system/vxvm/vras-vradmind:default
online Feb_14 svc:/system/filesystem/local:default
online Feb_14 svc:/system/boot-archive-update:default
online Feb_14 svc:/system/cron:default
online Feb_14 svc:/network/shares/group:default
online Feb_14 svc:/system/sysidtool:net
online Feb_14 svc:/system/vxfs/vxfsldlic:default
online Feb_14 svc:/network/routing-setup:default
online Feb_14 svc:/network/rpc/bind:default
online Feb_14 svc:/network/nfs/cbd:default
online Feb_14 svc:/system/vxodm:default
online Feb_14 svc:/system/sysidtool:system
online Feb_14 svc:/network/nfs/mapid:default
online Feb_14 svc:/network/nfs/status:default
online Feb_14 svc:/milestone/sysconfig:default
online Feb_14 svc:/application/font/fc-cache:default
online Feb_14 svc:/network/nfs/nlockmgr:default
online Feb_14 svc:/system/postrun:default
online Feb_14 svc:/application/stosreg:default
online Feb_14 svc:/system/sac:default
online Feb_14 svc:/network/inetd:default
online Feb_14 svc:/system/utmp:default
online Feb_14 svc:/system/console-login:default
online Feb_14 svc:/application/management/wbem:default
online Feb_14 svc:/network/rpc/gss:default
online Feb_14 svc:/application/x11/xfs:default
online Feb_14 svc:/application/font/stfsloader:default
online Feb_14 svc:/network/rpc/rstat:default
online Feb_14 svc:/network/rpc/cde-calendar-manager:default
online Feb_14 svc:/network/rpc/cde-ttdbserver:tcp
online Feb_14 svc:/network/rpc/smserver:default
online Feb_14 svc:/network/rpc/rusers:default
online Feb_14 svc:/network/security/ktkt_warn:default
online Feb_14 svc:/network/cde-spc:default
online Feb_14 svc:/network/nfs/client:default
online Feb_14 svc:/network/telnet:default
online Feb_14 svc:/network/nfs/rquota:default
online Feb_14 svc:/network/ftp:default
online Feb_14 svc:/network/finger:default
online Feb_14 svc:/network/login:rlogin
online Feb_14 svc:/network/shell:default
online Feb_14 svc:/network/stdiscover:default
online Feb_14 svc:/network/stlisten:default
online Feb_14 svc:/network/bpcd/tcp:default
online Feb_14 svc:/network/vnetd/tcp:default
online Feb_14 svc:/network/vopied/tcp:default
online Feb_14 svc:/network/bpjava-msvc/tcp:default
online Feb_14 svc:/system/filesystem/volfs:default
online Feb_14 svc:/system/filesystem/autofs:default
online Feb_14 svc:/network/ssh:default
online Feb_14 svc:/system/system-log:default
online Feb_14 svc:/system/dumpadm:default
online Feb_14 svc:/network/smtp:sendmail
online Feb_14 svc:/application/management/seaport:default
online Feb_14 svc:/application/management/snmpdx:default
online Feb_14 svc:/application/management/sma:default
online Feb_14 svc:/application/management/dmi:default
online Feb_14 svc:/system/fmd:default
online Feb_14 svc:/system/fpsd:default
online Feb_14 svc:/system/webconsole:console
online Feb_14 svc:/milestone/multi-user:default
online Feb_14 svc:/system/vxvm/vxvm-recover:default
online Feb_14 svc:/system/vxdbd:default
online Feb_14 svc:/application/graphical-login/cde-login:default
online Feb_14 svc:/application/cde-printinfo:default
online Feb_14 svc:/system/vxsvc:default
online Feb_14 svc:/system/xprtld:default
offline Feb_14 svc:/network/inetd-upgrade:default
offline Feb_14 svc:/milestone/multi-user-server:default
offline Feb_14 svc:/system/zones:default
offline Feb_14 svc:/application/print/ipp-listener:default
offline Feb_14 svc:/system/basicreg:default
offline Feb_14 svc:/application/print/rfc1179:default
2.svcs service
查看单个服务及其状态
bash-3.00# svcs telnet
STATE STIME FMRI
online Feb_14 svc:/network/telnet:default
bash-3.00# svcs ssh
STATE STIME FMRI
online Feb_14 svc:/network/ssh:default
3.svcs –d service
显示该服务所依赖的服务,如
bash-3.00# svcs -d inetd
STATE STIME FMRI
online Feb_14 svc:/network/loopback:default
online Feb_14 svc:/milestone/name-services:default
online Feb_14 svc:/milestone/network:default
online Feb_14 svc:/system/filesystem/local:default
online Feb_14 svc:/network/rpc/bind:default
online Feb_14 svc:/milestone/sysconfig:default
offline Feb_14 svc:/network/inetd-upgrade:default
bash-3.00# svcs -d ssh
STATE STIME FMRI
online Feb_14 svc:/network/loopback:default
online Feb_14 svc:/network/physical:default
online Feb_14 svc:/system/cryptosvc:default
online Feb_14 svc:/system/filesystem/local:default
online Feb_14 svc:/system/utmp:default
online Feb_14 svc:/system/filesystem/autofs:default
3.svcs –D service
显示依赖于该服务的服务,如
bash-3.00# svcs -D inetd
STATE STIME FMRI
online Feb_14 svc:/milestone/multi-user:default
bash-3.00# svcs -D ssh
STATE STIME FMRI
offline Feb_14 svc:/milestone/multi-user-server:default
4.svcs –p service
显示该服务的进程号,如:
bash-3.00# svcs -p ssh
STATE STIME FMRI
online Feb_14 svc:/network/ssh:default
Feb_14 1880 sshd
bash-3.00# svcs -p inetd
STATE STIME FMRI
online Feb_14 svc:/network/inetd:default
Feb_14 1747 inetd
5.svcs –l service
显示该服务的所有可用信息,如:
bash-3.00# svcs -l ssh
fmri svc:/network/ssh:default
name SSH server
enabled true
state online
next_state none
state_time Tue Feb 14 10:16:45 2012
logfile /var/svc/log/network-ssh:default.log
restarter svc:/system/svc/restarter:default
contract_id 73
dependency require_all/none svc:/system/filesystem/local (online)
dependency optional_all/none svc:/system/filesystem/autofs (online)
dependency require_all/none svc:/network/loopback (online)
dependency require_all/none svc:/network/physical (online)
dependency require_all/none svc:/system/cryptosvc (online)
dependency require_all/none svc:/system/utmp (online)
dependency require_all/restart file://localhost/etc/ssh/sshd_config (online)
bash-3.00# svcs -l inetd
fmri svc:/network/inetd:default
name inetd
enabled true
state online
next_state none
state_time Tue Feb 14 10:16:40 2012
logfile /var/svc/log/network-inetd:default.log
restarter svc:/system/svc/restarter:default
contract_id 65
dependency require_any/error svc:/network/loopback (online)
dependency require_all/error svc:/system/filesystem/local (online)
dependency optional_all/error svc:/milestone/network (online)
dependency optional_all/error svc:/network/rpc/bind (online)
dependency optional_all/none svc:/network/inetd-upgrade (offline)
dependency require_all/none svc:/milestone/sysconfig (online) svc:/milestone/name-services (online)
6.svcs –x service
此命令可以显示有关该服务的一些解释信息,如:
bash-3.00# svcs -x inetd
svc:/network/inetd:default (inetd)
State: online since Tue Feb 14 10:16:40 2012
See: inetd(1M)
See: /var/svc/log/network-inetd:default.log
Impact: None.
bash-3.00# svcs -x ssh
svc:/network/ssh:default (SSH server)
State: online since Tue Feb 14 10:16:45 2012
See: sshd(1M)
See: /var/svc/log/network-ssh:default.log
Impact: None.
阅读(8968) | 评论(0) | 转发(0) |