Porteus 5.0rc2 /var/log/messages

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
Post Reply
User avatar
Ed_P
Moderator
Moderator
Posts: 5625
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Porteus 5.0rc2 /var/log/messages

Post#1 by Ed_P » 15 Sep 2020, 14:54

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/? :%)
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1640
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

5.0rc2 /var/log/messages

Post#2 by donald » 15 Sep 2020, 18:10

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

Code: Select all

/usr/bin/run-parts /etc/cron.daily 1> /dev/null
Create a /var/log/spooler file and the command does its job.
at least if run manually.

User avatar
Ed_P
Moderator
Moderator
Posts: 5625
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

5.0rc2 /var/log/messages

Post#3 by Ed_P » 15 Sep 2020, 20:04

Thank you donald. :)

Confused with the

Code: Select all

/usr/bin/run-parts /etc/cron.daily 1> /dev/null
suggestion. /etc/cron.daily for me is a folder with 2 files in it,

Code: Select all

guest@porteus:/etc/cron.daily$ ls
certwatch*  logrotate*
guest@porteus:/etc/cron.daily$ 
how does the run-parts command know which file to execute?

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# 
So the message are now current only.

Is there an option to delete messages older than say 48 hrs?
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1640
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Porteus 5.0rc2 /var/log/messages

Post#4 by donald » 17 Sep 2020, 11:07

Ed_P wrote:
15 Sep 2020, 20:18
how does the run-parts command know which file to execute?
# 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
...........
so it doesn't do any harm if run manually -- IMO
Is there an option to delete messages older than say 48 hrs?
Yes, your preferred text editor. :)

User avatar
Ed_P
Moderator
Moderator
Posts: 5625
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Porteus 5.0rc2 /var/log/messages

Post#5 by Ed_P » 17 Sep 2020, 13:45

donald wrote:
17 Sep 2020, 11:07
Yes, your preferred text editor. :)
:lol: Thank you donald. :beer:

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)
Ed

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2578
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

Porteus 5.0rc2 /var/log/messages

Post#6 by ncmprhnsbl » 18 Sep 2020, 13:55

Ed_P wrote:
18 Sep 2020, 06:36
In the past logrotate used a file in /etc/ named logrotate.conf. But that file isn't in 5.0rc2.
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

User avatar
Ed_P
Moderator
Moderator
Posts: 5625
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 & 5.0rc2 Cinnamon 64 ISOs
Location: Western NY, USA

Porteus 5.0rc2 /var/log/messages

Post#7 by Ed_P » 18 Sep 2020, 17:54

ncmprhnsbl wrote:
18 Sep 2020, 13:55
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
:o Apparently not. :oops: I must have mistyped it last night. Thank you ncmp. :)

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
I don't see dupes in the file's code.

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
}
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1640
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Porteus 5.0rc2 /var/log/messages

Post#8 by donald » 18 Sep 2020, 19:23

Ed_P wrote:
18 Sep 2020, 17:54
Any ideas about these msgs?
I don't see dupes in the file's code.
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.

Post Reply