
Porteus 5.0rc2 /var/log/messages
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages
I have entries in my /var/log/messages file going back to August. I don't recall this problem in 4.0. I thought there was a command in the shutdown process to trim them. Is there a command to trim the size of the 5.0rc2 files in /var/log/? 

-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
5.0rc2 /var/log/messages
Normally this is done by a cron job [logrotate] every day at 19:30
if the file size exceeds 500k
Obviously it does not work.
Run the command manually [root] and you can see why
Create a /var/log/spooler file and the command does its job.
at least if run manually.
if the file size exceeds 500k
Obviously it does not work.
Run the command manually [root] and you can see why
Code: Select all
/usr/bin/run-parts /etc/cron.daily 1> /dev/null
at least if run manually.
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
5.0rc2 /var/log/messages
Thank you donald.
Confused with the suggestion. /etc/cron.daily for me is a folder with 2 files in it, how does the run-parts command know which file to execute?
Added in 13 minutes 22 seconds:
Ok, the results of your suggestions.
So the message are now current only.
Is there an option to delete messages older than say 48 hrs?

Confused with the
Code: Select all
/usr/bin/run-parts /etc/cron.daily 1> /dev/null
Code: Select all
guest@porteus:/etc/cron.daily$ ls
certwatch* logrotate*
guest@porteus:/etc/cron.daily$
Added in 13 minutes 22 seconds:
Ok, the results of your suggestions.
Code: Select all
guest@porteus:/etc/cron.daily$ ls
certwatch* logrotate*
guest@porteus:/etc/cron.daily$ su
Password:
root@porteus:/etc/cron.daily# /usr/bin/run-parts /etc/cron.daily 1> /dev/null
error: /etc/logrotate.conf:40 duplicate log entry for /var/log/wtmp
error: /etc/logrotate.conf:48 duplicate log entry for /var/log/btmp
error: stat of /var/log/spooler failed: No such file or directory
root@porteus:/etc/cron.daily# ls /var/log/s*
/var/log/scripts@ /var/log/setup@ /var/log/spooler
/var/log/secure /var/log/slim.log /var/log/syslog
/var/log/samba:
root@porteus:/etc/cron.daily# /usr/bin/run-parts /etc/cron.daily 1> /dev/null
error: /etc/logrotate.conf:40 duplicate log entry for /var/log/wtmp
error: /etc/logrotate.conf:48 duplicate log entry for /var/log/btmp
root@porteus:/etc/cron.daily# cat /var/log/messages
Sep 15 16:10:11 porteus syslogd[885]: syslogd v2.1.2: restart.
Sep 15 16:10:11 porteus logrotate: ALERT - exited abnormally.
Sep 15 16:12:04 porteus kernel: [23693.013287] xed[5517]: segfault at 7fe0c225cd40 ip 00007fe0d573c9b4 sp 00007ffdf7455c90 error 4 in libglib-2.0.so.0.6400.4[7fe0d570a000+7e000]
Sep 15 16:12:04 porteus kernel: [23693.013320] Code: 44 24 08 48 85 c0 74 03 44 89 28 31 c0 85 db 0f 9f c0 48 83 c4 48 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 44 00 00 48 8b 41 10 <48> 8b 00 48 85 c0 0f 84 90 00 00 00 41 83 46 58 01 4c 89 f7 48 89
root@porteus:/etc/cron.daily#
Is there an option to delete messages older than say 48 hrs?
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Porteus 5.0rc2 /var/log/messages
# run-parts: Runs all the scripts found in a directory.
The command posted is what would/should be executed daily -- see:
Code: Select all
crontab -l
...........
# Run daily cron jobs at 19:30 every day:
30 19 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
...........
Yes, your preferred text editor.Is there an option to delete messages older than say 48 hrs?

- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages


Added in 16 hours 51 minutes 13 seconds:
In the past logrotate used a file in /etc/ named logrotate.conf. But that file isn't in 5.0rc2.
Re: What Makes save.dat File Grow? There A "Prune" App For I (Post by Ed_P #21470)
- ncmprhnsbl
- DEV Team
- Posts: 4253
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Porteus 5.0rc2 /var/log/messages
are you sure?
Code: Select all
$ ls /mnt/live/memory/images/001-core.xzm/etc/logrotate*
/mnt/live/memory/images/001-core.xzm/etc/logrotate.conf
/mnt/live/memory/images/001-core.xzm/etc/logrotate.d:
syslog wpa_supplicant
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages
ncmprhnsbl wrote: ↑18 Sep 2020, 13:55are you sure?Code: Select all
$ ls /mnt/live/memory/images/001-core.xzm/etc/logrotate* /mnt/live/memory/images/001-core.xzm/etc/logrotate.conf /mnt/live/memory/images/001-core.xzm/etc/logrotate.d: syslog wpa_supplicant



Any ideas about these msgs?
Code: Select all
root@porteus:/etc/cron.daily# /usr/bin/run-parts /etc/cron.daily 1> /dev/null
error: /etc/logrotate.conf:40 duplicate log entry for /var/log/wtmp
error: /etc/logrotate.conf:48 duplicate log entry for /var/log/btmp
Code: Select all
# Rotate /var/log/wtmp:
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}
# Rotate /var/log/btmp:
/var/log/btmp {
monthly
create 0600 root root
rotate 1
}
-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Porteus 5.0rc2 /var/log/messages
Not there, but
In /etc/logrotate.conf is this:
# some packages install log rotation information in this directory:
include /etc/logrotate.d
> go there:
The instruction to rotate /var/log/wtmp and /var/log/btmp is also in
/etc/logrotate.d/syslog
...that's the reason.
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages
Yes indeed! Thank you donald.

So, create a /var/log/spooler file and comment out the dupe lines in /etc/logrotate.conf and we have a functioning system. Do I need to add a command in one of the autorun files for it to run regularly?
Added in 7 hours 28 minutes 35 seconds:
Why do I need logs and 4 weeks of backups of them? I run Porteus as an ISO with a savedat file which means, if I understand correctly, all these logs and backups reside in my RAM when I am running. What purpose do the logs serve the normal user?

-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Porteus 5.0rc2 /var/log/messages
Yes
I don't know if there is / was a reason to have entries in both files.and comment out the dupe lines in /etc/logrotate.conf
No, only the spooler file is required.Do I need to add a command in one of the autorun files for it to run regularly?
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages
Thank you donald.
Any comment on the need for the logs?

-
- Full of knowledge
- Posts: 2104
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Porteus 5.0rc2 /var/log/messages
The collection of log files could be considered useless by a "normal user"
-- [ define "normal user" ] -- if everything runs smoothly.
But if not, some of these log files are quite valuable.
-- [ define "normal user" ] -- if everything runs smoothly.
But if not, some of these log files are quite valuable.
- Ed_P
- Contributor
- Posts: 8908
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Porteus 5.0rc2 /var/log/messages
normal user : someone who boots and uses the system for 3 days without issues. Able to access the Internet, print files, play games, check the weather, access other systems on a network, uses a notebook and closes the lid when he/she leaves it.
