JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaroot(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2c(1M)

mib2mof(1M)

mibiisa(1M)

mipagent(1M)

mipagentconfig(1M)

mipagentstat(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mount_cachefs(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mount_xmemfs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsstat(1M)

nisaddcred(1M)

nisaddent(1M)

nisauthconf(1M)

nisbackup(1M)

nis_cachemgr(1M)

nisclient(1M)

nisd(1M)

nisd_resolv(1M)

nisinit(1M)

nisldapmaptest(1M)

nislog(1M)

nispasswdd(1M)

nisping(1M)

nispopulate(1M)

nisprefadm(1M)

nisrestore(1M)

nisserver(1M)

nissetup(1M)

nisshowcache(1M)

nisstat(1M)

nisupdkeys(1M)

nlsadmin(1M)

nscd(1M)

nslookup(1M)

nsupdate(1M)

ntpdate(1M)

ntpq(1M)

ntptrace(1M)

nulladm(1M)

obpsym(1M)

ocfserv(1M)

oplhpd(1M)

parse_dynamic_clustertoc(1M)

passmgmt(1M)

patchadd(1M)

patchrm(1M)

pbind(1M)

pcmciad(1M)

pfinstall(1M)

pgxconfig(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgrm(1M)

plockstat(1M)

pmadm(1M)

pmconfig(1M)

pntadm(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

powerd(1M)

poweroff(1M)

ppdmgr(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

pprosetup(1M)

pprosvc(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

printmgr(1M)

privatepw(1M)

prodreg(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

putdev(1M)

putdgrp(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

regadm(1M)

reject(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

repquota(1M)

re-preinstall(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rm_install_client(1M)

rmmount(1M)

rmt(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.nisd(1M)

rpc.nisd_resolv(1M)

rpc.nispasswdd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rpld(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sac(1M)

sacadm(1M)

sadc(1M)

saf(1M)

sar(1M)

savecore(1M)

scadm(1M)

sckmd(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

setuname(1M)

setup_install_server(1M)

sf880drd(1M)

sftp-server(1M)

share(1M)

shareall(1M)

share_nfs(1M)

showmount(1M)

showrev(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smartcard(1M)

smattrpop(1M)

smbios(1M)

smc(1M)

smccompile(1M)

smcconf(1M)

smcregister(1M)

smcron(1M)

smcwebserver(1M)

smdiskless(1M)

smexec(1M)

smgroup(1M)

smlog(1M)

smmaillist(1M)

smmultiuser(1M)

smosservice(1M)

smpatch(1M)

smprofile(1M)

smreg(1M)

smrole(1M)

smrsh(1M)

smserialport(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

smuser(1M)

snmpbulkget(1M)

snmpbulkwalk(1M)

snmpcmd(1M)

snmpconf(1M)

snmpd(1M)

snmpdelta(1M)

snmpdf(1M)

snmpdx(1M)

snmpget(1M)

snmpgetnext(1M)

snmpinform(1M)

snmpnetstat(1M)

snmpset(1M)

snmptable(1m)

snmptest(1M)

snmptranslate(1m)

snmptrap(1M)

snmptrapd(1M)

snmpusm(1M)

snmpvacm(1M)

snmpwalk(1M)

snmpXdmid(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

suninstall(1M)

SUNWafb_config(1M)

SUNWffb_config(1M)

SUNWgfb_config(1M)

SUNWifb_config(1M)

SUNWjfb_config(1M)

SUNWkfb_config(1M)

SUNWm64_config(1M)

SUNWnfb_config(1M)

SUNWpfb_config(1M)

SUNWzulu_config(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

sysidconfig(1M)

sysidkbd(1M)

sysidnet(1M)

sysidnfs4(1M)

sysidns(1M)

sysidpm(1M)

sysidroot(1M)

sysidsys(1M)

sysidtool(1M)

syslogd(1M)

sys-unconfig(1M)

talkd(1M)

tapes(1M)

taskstat(1M)

tcxconfig(1M)

telinit(1M)

telnetd(1M)

System Administration Commands - Part 3

syslogd

- log system messages

Synopsis

/usr/sbin/syslogd [-d] [-f configfile] [-m markinterval] 
     [-p path] [-t | -T]

Description

syslogd reads and forwards system messages to the appropriate log files or users, depending upon the priority of a message and the system facility from which it originates. The configuration file /etc/syslog.conf (see syslog.conf(4)) controls where messages are forwarded. syslogd logs a mark (timestamp) message every markinterval minutes (default 20) at priority LOG_INFO to the facility whose name is given as mark in the syslog.conf file.

A system message consists of a single line of text, which may be prefixed with a priority code number enclosed in angle-brackets (< >); priorities are defined in <sys/syslog.h>.

syslogd reads from the STREAMS log driver, /dev/log, and from any transport provider specified in /etc/netconfig, /etc/net/transport/hosts, and /etc/net/transport/services.

syslogd reads the configuration file when it starts up, and again whenever it receives a HUP signal (see signal.h(3HEAD), at which time it also closes all files it has open, re-reads its configuration file, and then opens only the log files that are listed in that file. syslogd exits when it receives a TERM signal.

As it starts up, syslogd creates the file /var/run/syslog.pid, if possible, containing its process identifier (PID).

If message ID generation is enabled (see log(7D)), each message will be preceded by an identifier in the following format: [ID msgid facility.priority]. msgid is the message's numeric identifier described in msgid(1M). facility and priority are described in syslog.conf(4). [ID 123456 kern.notice] is an example of an identifier when message ID generation is enabled.

If the message originated in a loadable kernel module or driver, the kernel module's name (for example, ufs) will be displayed instead of unix. See EXAMPLES for sample output from syslogd with and without message ID generation enabled.

In an effort to reduce visual clutter, message IDs are not displayed when writing to the console; message IDs are only written to the log file. See Examples.

The /etc/default/syslogd file contains the following default parameter settings, which are in effect if neither the -t nor -T option is selected. See FILES.

The recommended way to allow or disallow message logging is through the use of the service management facility (smf(5)) property:

svc:/system/system-log/config/log_from_remote

This property specifies whether remote messages are logged. log_from_remote=true is equivalent to the -t command-line option and false is equivalent to the -T command-line option. The default value for -log_from_remote is false. See NOTES, below.

LOG_FROM_REMOTE

Specifies whether remote messages are logged. LOG_FROM_REMOTE=NO is equivalent to the -t command-line option. The default value for LOG_FROM_REMOTE is YES.

Options

The following options are supported:

-d

Turn on debugging. This option should only be used interactively in a root shell once the system is in multi-user mode. It should not be used in the system start-up scripts, as this will cause the system to hang at the point where syslogd is started.

-f configfile

Specify an alternate configuration file.

-m markinterval

Specify an interval, in minutes, between mark messages.

-p path

Specify an alternative log device name. The default is /dev/log.

-T

Enable the syslogd UDP port to turn on logging of remote messages. This is the default behavior. See Files.

-t

Disable the syslogd UDP port to turn off logging of remote messages. See Files.

Examples

Example 1 syslogd Output Without Message ID Generation Enabled

The following example shows the output from syslogd when message ID generation is not enabled:

Sep 29 21:41:18 cathy unix: alloc /: file system full

Example 2 syslogd Output with ID generation Enabled

The following example shows the output from syslogd when message ID generation is enabled. The message ID is displayed when writing to log file/var/adm/messages.

Sep 29 21:41:18 cathy ufs: [ID 845546 kern.notice] 
                                    alloc /: file system full

Example 3 syslogd Output with ID Generation Enabled

The following example shows the output from syslogd when message ID generation is enabled when writing to the console. Even though message ID is enabled, the message ID is not displayed at the console.

Sep 29 21:41:18 cathy ufs: alloc /: file system full

Example 4 Enabling Acceptance of UDP Messages from Remote Systems

The following commands enable syslogd to accept entries from remote systems.

# svccfg -s svc:/system/system-log setprop config/log_from_remote = true
# svcadm restart svc:/system/system-log

Files

/etc/syslog.conf

Configuration file

/var/run/syslog.pid

Process ID

/etc/default/syslogd

Contains default settings. You can override some of the settings by command-line options.

/dev/log

STREAMS log driver

/etc/netconfig

Transport providers available on the system

/etc/net/transport/hosts

Network hosts for each transport

/etc/net/transport/services

Network services for each transport

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWcsu

See Also

logger(1), svcs(1), msgid(1M), svcadm(1M), svccfg(1M), syslog(3C), syslog.conf(4), attributes(5), signal.h(3HEAD), smf(5), log(7D)

Notes

The mark message is a system time stamp, and so it is only defined for the system on which syslogd is running. It can not be forwarded to other systems.

When syslogd receives a HUP signal, it attempts to complete outputting pending messages, and close all log files to which it is currently logging messages. If, for some reason, one (or more) of these files does not close within a generous grace period, syslogd discards the pending messages, forcibly closes these files, and starts reconfiguration. If this shutdown procedure is disturbed by an unexpected error and syslogd cannot complete reconfiguration, syslogd sends a mail message to the superuser on the current system stating that it has shut down, and exits.

Care should be taken to ensure that each window displaying messages forwarded by syslogd (especially console windows) is run in the system default locale (which is syslogd's locale). If this advice is not followed, it is possible for a syslog message to alter the terminal settings for that window, possibly even allowing remote execution of arbitrary commands from that window.

The syslogd service is managed by the service management facility, smf(5), under the service identifier:

 svc:/system/system-log:default

Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The service's status can be queried using the svcs(1) command.

When syslogd is started by means of svcadm(1M), if a value is specified for LOG_FROM_REMOTE in the /etc/defaults/syslogd file, the SMF property svc:/system/system-log/config/log_from_remote is set to correspond to the LOG_FROM_REMOTE value and the /etc/default/syslogd file is modified to replace the LOG_FROM_REMOTE specification with the following comment:

# LOG_FROM_REMOTE is now set using svccfg(1m), see syslogd(1m).

If neither LOG_FROM_REMOTE nor svc:/system/system-log/config/log_from_remote are defined, the default is to log remote messages.

On installation, the initial value of svc:/system/system-log/config/log_from_remote is false.