void-linux / socklog-void Goto Github PK
View Code? Open in Web Editor NEWSockLog configuration for Void Linux
Home Page: https://voidlinux.org
SockLog configuration for Void Linux
Home Page: https://voidlinux.org
On a fresh void install I just got an error message when using svlogtail
on a service that does not yet have rotated logs (*.[us]
):
[root@rootfs /]# svlogtail xbps
cat: '/var/log/socklog/xbps/*.[us]': No such file or directory
After that the current
log is displayed.
Maybe there is an elegant way in sh
to check whether a glob expands? Then that could be used as a guard for https://github.com/void-linux/socklog-void/blob/master/svlogtail#L23?
Hi,
I'm new to void, and before when I was using systemd logging I would run logrotate
to keep log files under control. I see that socklog/svlogd has built-in rotation support, which is cool, and I wonder if it would be useful to add some rotation limits to these default profiles. Alternatively, I can edit the socklog .conf files, but will that be overwritten by socklog updates?
Cheers
Logs often have many lines, and then it's often useful to use a pager to display them, because 1) one is brought directly to the beginning of the log and does not have to search for it, and 2) one can search the file interactively using a pager like less
.
Maybe I'm missing something, but right now I have to first pipe the output to less
, then when I go to the bottom of the content the pager "loses input": I have to Ctrl-C
the tail command, then I can use the pager as usual.
I had the idea of implementing a -f
flag just like in the regular tail
command. Benefits:
tail
(which many users are familiar with).svlogtail | less
like usual without the dangling tail
at the end that needs be Ctrl-C
'.If there is interest I think I could implement this.
Fails with chpst: fatal: unable to run: nanoklogd: access denied
Trying to run it manually with strace chpst -u nobody:nogroup /usr/bin/nanoklogd
I get the following strace
execve("/usr/bin/chpst", ["chpst", "-u", "nobody:nogroup", "/usr/bin/nanoklogd"], 0x7ffcfefb40f8 /* 18 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7fef8a03bd88) = 0
set_tid_address(0x7fef8a03c204) = 4373
mprotect(0x7fef8a038000, 4096, PROT_READ) = 0
mprotect(0x55928bc82000, 4096, PROT_READ) = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
read(3, "root:x:0:0:root:/root:/bin/sh\nno"..., 1024) = 704
lseek(3, -620, SEEK_CUR) = 84
close(3) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
read(3, "root:x:0:\nbin:x:1:\nsys:x:2:\nkmem"..., 1024) = 569
lseek(3, -231, SEEK_CUR) = 338
close(3) = 0
setgroups(1, [99]) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
setgid(99) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
setuid(99) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
execve("/usr/bin/nanoklogd", ["/usr/bin/nanoklogd"], 0x55928bc839b0 /* 18 vars */) = -1 EACCES (Permission denied)
write(2, "chpst: fatal: unable to run: /us"..., 63chpst: fatal: unable to run: /usr/bin/nanoklogd: access denied
) = 63
exit_group(111) = ?
+++ exited with 111 +++
Would it be possible to add an option to svlogtail
to only show logs from current boot?
I was trying to replicate the behaviour of journalctl -p 3 -b
, right now I can do svlogtail errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.