For my link archive: [Archive.is] My website is marked as unsafe. How can I change this? | Facebook Help Community
Archive for July 29th, 2019
Logging to syslog on a VMware ESXi machine
Posted by jpluimers on 2019/07/29
Since “esxi write entry to syslog” didn’t return results on how to add new syslog entries, only how to configure syslog.
It was much easier than I hoped for:
logger TEST
With a default configuration this then ends up in /var/log/syslog.log
:
grep TEST /var/log/syslog.log
2019-07-29T10:48:31Z root: TEST
Now I know the command, I found
- [WayBack] Shell scripting: Write message to a syslog / log file – nixCraft.
- [WayBack] logger(1) – Linux man page Logger makes entries in the system log. It provides a shell command interface to the syslog(3) system log module.
- [WayBack] busybox/logger.c at master · mozilla-b2g/busybox
–jeroen
Posted in Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
logging – Where is “/var/log/messages” on mac-osx? – Server Fault
Posted by jpluimers on 2019/07/29
logging – Where is “/var/log/messages” on mac-osx? – Server Fault
TL;DR: because most of it is in /var/log/system.log
which is configured in /etc/asl.conf
, but the documentation example about syslog.conf
never got updated.
Long read
The example in syslog.conf
is wrong at WayBack: Mac OS X Manual Page For syslog.conf(5) and man syslog.conf
:
EXAMPLES A configuration file might appear as follows: ... # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none /var/log/messages ... FILES /etc/syslog.conf The syslogd(8) configuration file.
It still is when writing this [WayBack]syslog.conf(5) Mac OS X Manual Page, so you have to look at /etc/syslog.conf
on a live system:
# Note that flat file logs are now configured in /etc/asl.conf install.* @127.0.0.1:32376
which means the actual configuration is in /etc/asl.conf
:
# Rules for /var/log/system.log > system.log mode=0640 format=bsd rotate=seq compress file_max=5M all_max=50M ? [= Sender kernel] file system.log ? [<= Level notice] file system.log ? [= Facility auth] [<= Level info] file system.log ? [= Facility authpriv] [<= Level info] file system.log
Documentation at [WayBack] asl.conf(5) Mac OS X Manual Page indicates this:
NAME asl.conf -- configuration file for syslogd(8) and aslmanager(8) DESCRIPTION The syslogd(8) server reads the /etc/asl.conf file at startup, and re-reads the file when it receives a HUP signal. The aslmanager(8) daemon reads the file when it starts. See the ASLMANAGER PARAMETER SETTINGS section for details on aslmanager-specific parameters.
Source
Based on [WayBack] logging – Where is “/var/log/messages” on mac-osx? – Server Fault:
Q:
When you read the man pages on Mac OS X, there are references to
/var/log/messages
, but if you look for the file, it doesn’t exist:
$ ls -l /var/log/messages
ls: /var/log/messages: No such file or directoryA:
2009 era: If you look at the actual
/etc/syslog.conf
instead of the man page, you see*.notice;authpriv,remoteauth,ftp,install.none;kern.debug;mail.crit /var/log/system.log
–jeroen
Posted in Apple, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, macOS 10.12 Sierra, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User | Leave a Comment »