Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
syslog or rsyslog?
#1
Are either of these system logging functions active in the power pmac's Linux? ps -A does not show a process of either name and /etc/log/syslog has date of 2009-10-08
I was contemplating using this for fault logging.
Reply
#2
(12-06-2012, 08:50 AM)JeffLowe Wrote: Are either of these system logging functions active in the power pmac's Linux? ps -A does not show a process of either name and /etc/log/syslog has date of 2009-10-08
I was contemplating using this for fault logging.

Startup scripts are located in

/.readonly/etc/init.d

The logger is

/.readonly/etc/init.d/rsyslog


We reduced the number of startup scripts to reduce bootup
time. However, there is no reason you cannot start them yourself whenever you want, or modify the bootup startup scripts.

To start it yourself do

/etc/init.d/rsyslog start

To stop it yourself do

/etc/init.d/rsyslog stop

To have it automatically start on boot make a symbolic link in the /.readonly/etc/rc2.d folder to rsyslog

For example:

mount -o remount,rw /
cd /.readonly/etc/rc2.d
ln -s ../init.d/rsyslog S11rsyslog
mount -o remount,ro /

The way debian linux startup scripts works is if there is a filename in the /etc/rc2.d folder starting with S it automatically calls that script with the start parameter after it. If there is a K at the beginning of the filename it automatically calls the script with the stop parameter. The startup order is determined by the number after the S.
The numbers need not be in sequence but the startup sequence relative to other S## is determined by the value of the number.

This rule applies to the folders /etc/rcS , /etc/rc0.d, rc1.d .. rc6.d. Go to http://en.wikipedia.org/wiki/Runlevel for some basics if you want to know about administering your system.
Reply
#3
(12-06-2012, 09:45 AM)hbausley Wrote:
(12-06-2012, 08:50 AM)JeffLowe Wrote: Are either of these system logging functions active in the power pmac's Linux? ps -A does not show a process of either name and /etc/log/syslog has date of 2009-10-08
I was contemplating using this for fault logging.

Startup scripts are located in

/.readonly/etc/init.d

The logger is

/.readonly/etc/init.d/rsyslog


We reduced the number of startup scripts to reduce bootup
time. However, there is no reason you cannot start them yourself whenever you want, or modify the bootup startup scripts.

To start it yourself do

/etc/init.d/rsyslog start

To stop it yourself do

/etc/init.d/rsyslog stop

To have it automatically start on boot make a symbolic link in the /.readonly/etc/rc2.d folder to rsyslog

For example:

mount -o remount,rw /
cd /.readonly/etc/rc2.d
ln -s ../init.d/rsyslog S11rsyslog
mount -o remount,ro /

The way debian linux startup scripts works is if there is a filename in the /etc/rc2.d folder starting with S it automatically calls that script with the start parameter after it. If there is a K at the beginning of the filename it automatically calls the script with the stop parameter. The startup order is determined by the number after the S.
The numbers need not be in sequence but the startup sequence relative to other S## is determined by the value of the number.

This rule applies to the folders /etc/rcS , /etc/rc0.d, rc1.d .. rc6.d. Go to http://en.wikipedia.org/wiki/Runlevel for some basics if you want to know about administering your system.

The above worked GREAT for me (THANKS), except I noticed that after rebooting the Power PMAC, the /var/log/messages file gets clobbered. I also saw that no backup files (/var/log/messages.1, /var/log/messages.2, etc) got created. So, the benefits of using syslog (log rollover/cleanup of old logs) is lost? Or am I missing something? Should I be looking for my logged messages elsewhere?
Reply
#4
Bill,

I believe one of our field engineers is actively working on this with you, but here is what I have.

/var, /etc, and /root are only stored in ram, so the read only versions they are copied from on boot can be relatively unchanged.

The flash storage contains 3 partitions / (linux filesystem), /opt (pmac firmware), and /opt/user (extra partition for customers to write stuff like this). The user file is only available on PMACs shipping with firmware 2.5.1.7 or above. See the attached Application Note. (It can be added by image, but precautions must be made)

The following procedure should move the logs to the /opt/user partition where it will not be replaced by pmac. It should only be attempted by advanced users. Creating a backup image first is strongly encouraged.

mount -o remount,rw /opt/user
echo “” >/opt/user/messages
rm -rf /.readonly/var/log/messages
ln -s /opt/user/messages /.readonly/var/log/messages
mount -o remount,rw /
nano /.readonly/etc/fstab
<Remove "ro," from /opt/user line and save file>
mount -o remount,ro /

reboot and start ryslog


Attached Files
.pdf   Using the User Folder to Save Data.pdf (Size: 673.52 KB / Downloads: 21)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)