Questions tagged [logs]

Configuring or analysing log files (text files where programs output error and informational messages, useful for debugging and troubleshooting).

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

Where does each of my local facilities logs to in Unix?

I was using local0 facility to log info in HAProxy. What I don't understand is in which file each of my facilities (local0 ... local7) logs to?
user avatar
0 votes
1 answer
14 views

Meaning of fields in ip6tables logs

I am parsing ufw logs, and running into limitations with the documentation that I am able to find for the ip6tables entries for ufw. This very nice blog post describes the iptables format well, but ...
user avatar
0 votes
2 answers
28 views

How to fix CVE-2018-364 vulnerability

I have found a log in my /log/messages showing a CVE-2018-3646 error with the following link, (https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html). I have accessed the mentioned file-...
user avatar
  • 1
0 votes
1 answer
20 views

Where are TPM 2.0 selftest messages logged?

Hopefully, this is a simple question regarding hardware I'm just now learning how to use: the TPM. My laptop has a TPM 2.0, and I need to become familiar with some basic functionality offered by the ...
user avatar
0 votes
1 answer
27 views

Why does OpenSSH debug2 handshake logging only on some logins, not on every login?

Running Ubuntu 18.04.1 LTS with package openssh-server 7.6p1-4ubuntu0.5 In /etc/ssh/sshd_config is set LogLevel DEBUG2. I get the debug2 log message of the client MACs offering part of handshake: May ...
user avatar
  • 31
0 votes
0 answers
34 views

cron is no longer logging, but it seems to be running

I am running Ubuntu 20.04 as a server on a remote machine. I have confirmed that cron is running as a service: $ sudo service cron status ● cron.service - Regular background program processing daemon ...
user avatar
0 votes
1 answer
29 views

While loop not outputting to a log file

I am making in-roads to getting a curl script to work as intended, working around some issue that requires pagination. My point is... the curl part works, BUT I can't get the output to log to a file. #...
user avatar
0 votes
0 answers
11 views

Logging input and output on terminal with script command, can I do this more elegantly?

Goal: to create a log of an entire terminal session, commands used and their output, including time and date. I have attempted to achieve this with the script command, which is commonly used in ...
user avatar
0 votes
1 answer
14 views

See logs of a command inside a systemd service?

I have a systemd service that runs ngrok. [Unit] Description=Ngrok After=network.service [Service] type=simple User=ubuntu WorkingDirectory=/home/ubuntu ExecStart=/snap/bin/ngrok http 4000 --host-...
user avatar
-1 votes
2 answers
42 views

Best way to run child process in C++ if you want to get output of the called command

I am writing an application in C++. In many places in my code I use system() function to run some commands. I am not sure this is an elegant solution and I would like to replace using this function by ...
user avatar
0 votes
0 answers
29 views

How to move log files in /var/log/journal to free disk space without losing logs?

I'd like to later check if there is a way / software to easily scan logs for issues one should look into² and if such exists scan all logs, including old logs. This is why for now I'd like to keep the ...
user avatar
  • 3,430
0 votes
0 answers
14 views

journalctl --vacuumtime=1h still shows logs from 3 days ago

After using the following command sudo journalctl --vacuum-time=1h (which should delete all logs except those written in the last hour) when I read logs with the command journalctl it still shows ...
user avatar
0 votes
0 answers
26 views

sudo logging sudo-io sometimes creates huge timing files

I have set up sudo- log_output logging using the following settings: Cmnd_Alias NOLOG = some commands like cat etc. Defaults log_output Defaults! NOLOG !log_output It works mostly okay, but ...
user avatar
0 votes
0 answers
33 views

"> $logfile" does not truncate, file size goes to 0 and a second later, is back to full size [duplicate]

I have a script that writes to a logfile like this: $ nohup myscript.sh > myscript.out 2>&1 & when the log file gets very large, I need to truncate it like this: > myscript.out I ...
user avatar
  • 1
1 vote
1 answer
38 views

Increase size-limit of messages written to /dev/kmsg

I have a custom initramfs whose logging output I wish to redirect to /dev/kmsg. The Kernel I am using is 5.10.52 However, I realized that I cannot write more than 992 bytes to /dev/kmsg at once. Is ...
user avatar
  • 75
0 votes
1 answer
20 views

Xorg log spams Present-flip: queue async flip during flip on CRTC 0 failed: Invalid argument

What does this error mean which I find in in my Xorg.0.log (WW) modeset(0): Present-flip: queue async flip during flip on CRTC 0 failed: Invalid argument (WW) modeset(0): Present-flip: detected too ...
user avatar
  • 22.4k
0 votes
1 answer
27 views

Redirect logs from file to Systemd journal

I have a program which is started by systemd service myprogram.service. Problem is that it is writing its logs directly to the log file /opt/myprogram/logs.txt. I want to redirect its logs into ...
user avatar
  • 3,872
1 vote
0 answers
51 views

When a systemd service starts a rootless `podman run` process, why is its output not associated with the service in the journal?

I have a simple systemd service in /etc/systemd/system/logtest.service, which creates a Podman container that outputs some text: [Unit] Description=Systemd log test [Service] Type=oneshot ExecStart=...
user avatar
  • 178
0 votes
0 answers
37 views

Turn off logging to journald for specified systemd service

I have a specific systemd service that I don't want its log to be logged to journald/journalctl. For now the reason is that it already logs to syslog (already rotated) and the journald/journalctl log ...
user avatar
  • 177
0 votes
0 answers
14 views

systemd unit fails to start when running journalctl system commands

System: RHEL 8.4 systemd version 239 Problem: I need to redirect journalctl system output as a user. My user is a system user (uid < 1000), and must be a system user. I also must use systemd --...
user avatar
  • 285
0 votes
0 answers
71 views

Why does my USB device randomly disconnects?

I am using Linux on a system that is constantly running. An USB Soundcard is connected to the system. From time to time, on a random basis, sometimes in the middle of the night, the usb disconnects ...
user avatar
  • 161
0 votes
1 answer
44 views

Bind error logging syslog

Im have this strange behaviour where my bind server is just forwarding info and notice errors to my remote syslog server. Current configuration on the named.conf file is: logging { channel syslog ...
user avatar
0 votes
1 answer
43 views

How to send systemd Start - Stop - Reload syslog messages to a file

I'd like to send Start/Stop/Reload systemd messages to a specific file. Specifically, mysqld doesn't seem to send daemon start/stop messages to the log-error file, so I'd like to have... something in ...
user avatar
  • 694
0 votes
0 answers
33 views

Linux command for searching a log

I’m trying to search an Apache log for a specific error, displaying the lines descending with counts. What would be the best way to accomplish this?
user avatar
  • 1
1 vote
1 answer
46 views

How to find a process by network domain it requests?

I noticed my Linux machine makes many DNS queries for a specific domain (subdomain) malicious.foo.bar How can I find out which application or process tries to resolve this domain? I also want to see ...
user avatar
0 votes
0 answers
14 views

Unix terminal logging with script and !n for command repeat from history

After starting terminal logging with script, I see that I cannot access a previous command from history using the !n option. I get the following error: event not found Any thoughts on why this is the ...
user avatar
  • 133
0 votes
1 answer
101 views

Change JournalD loglevel of running SystemD service without reload

I have a simple service written in Python that is using SystemD JournalHandler for logging (SysLogHandler should work similarly). # myservice.py import time import logging from systemd.journal import ...
user avatar
0 votes
0 answers
13 views

RHEL 6 sa and sar log file size

I am trying to figure out why sa and sar log files are much larger on one of our servers. Basically double the size -rw-r--r-- 1 root root 100M Feb 5 23:59 sa05 -rw-r--r-- 1 root root 100M Feb 6 23:...
user avatar
0 votes
2 answers
92 views

Logging with shell script - catch STDERR to log with timestamp

SOLVED: A few months ago, I gain interest in logging in shell scripts. The first idea was a manual logging function such as this one: add2log() { printf "$(date)\tINFO\t%s\t%s\n" "$...
user avatar
  • 21
0 votes
2 answers
92 views

ufw not logging all connections as expected

I am trying to setup logging on ubuntu server 20.04.4 using ufw, but I'll take non-ufw advice as well. I am running a test https server on port 20000 and want to log all connections to it. Here's what ...
user avatar
  • 19
0 votes
0 answers
93 views

Where is the BERT log in linux located?

Fatal errors are recorded into BERT logs. BERT reports fatal errors that are resulted from surprise system reset or shutdown before OS had the chance to see the error. I think BERT stands for Boot ...
user avatar
2 votes
1 answer
61 views

POSIX Shell: Output to log and prepend lines with timestamps using a function

I would like a shell script to have all it's output for stdout and stderr logged to an external file with timestamps prepended to each line (plus a few extra items), without changing how the script is ...
user avatar
  • 73
0 votes
0 answers
326 views

I've ValueError: Unable to configure handler 'file' on pycharm and also on vscode

I have a bit strange situation with logging in python, django. There are python,django in one docker container and postgres in other, everything runs on Linux machine. When I start server on 0.0.0.0:...
user avatar
0 votes
0 answers
16 views

MailLog - View passwords attempted in failed attempt

Is there any log in a Linux system (Ubuntu) That keeps a record of the failed password used. I am monitoring logs and see a lot of failed attempts, While i have measures in place to auto ban the IP ...
user avatar
1 vote
0 answers
75 views

logrotate not compressing files

I'm having issues with logrotate as it does not compress files. We migrated from Centos 7 to Alma linux and since it has not worked. I'm trying to get logrotate to rotate and compress log files from /...
user avatar
0 votes
1 answer
96 views

Boot taking forever with a 106 JBOD attached. - WARNING: Device /dev/xxx not initialized in udev database even after waiting 10000000 microseconds

When attaching a 106 JBOD enclsoures (106 18TB drives via HBA card) to a Debian Bullseye server, i get spammed with the following for each path to any of the 106 drives. It makes a reboot take a huge ...
user avatar
0 votes
1 answer
49 views

Stream filtering changing log file in realtime

I have file.log with this sample: 11-Feb-2022 18:34:42 lorem uneeded5 11-Feb-2022 18:34:43 water uneeded6 11-Feb-2022 18:34:44 ipsum uneeded7 11-Feb-2022 18.34.45 waterfall uneeded8 I expect output ...
user avatar
0 votes
1 answer
36 views

date string column to timestamp column in a log file

I have log.txt with sample output like these: ... 10-Feb-2022 15:15:14.099 lorem 10-Feb-2022 15:15:15.133 ipsum 10-Feb-2022 15:15:16.233 dolor ... I expect the output of filtered log.txt will be ... ...
user avatar
0 votes
0 answers
15 views

How to avoid "# messages dropped." when logging?

I am logging messages from a low-level C application that is actually running on Android. Whenever my code goes to the crucial part of a library I am using, I get the log message "1002 messages ...
user avatar
2 votes
1 answer
76 views

Exclude from rsync log file or output non-updated files

For rsyncs that involve a large number of potentially transferred files, I mean to have a "clean" log, with only what was transferred. I worked with stdout, since: I did not know how to ...
user avatar
1 vote
0 answers
44 views

PASSWORD - Password change log

Is there any way to check all password change logs for one specific user? I'm using macOS and since its based on Unix, I thought that this could be the place to post this question. Someone changed my ...
user avatar
0 votes
0 answers
23 views

Log directories that users go to

Is there any way to log the directories that a user goes to? For example as soon as the user jack goes to /home/jack/music/ there is a log that shows he went to /home/jack/music/.
user avatar
  • 1
0 votes
1 answer
73 views

Show only dates bigger than the search pattern even if the search pattern does not exist in the (log) file

I want to search the syslog for dates bigger than a specific search pattern. For example I want to find every syslog entry where the date is bigger than JAN 6 16:24:00. I know I could use sed (sed -n ...
user avatar
  • 2,281
0 votes
1 answer
184 views

Why does supervisor does not log the output of a child process?

When I run the script server.sh (runs a quake dedicated server) in the terminal it will create initialization output like ------- Game Initialization ------- gamename: baseqz gamedate: May 25 2016 ...
user avatar
0 votes
1 answer
192 views

How to enable systemd dhcp client logging?

Trying to debug some systemd dhcp client behavior, but I can't figure out how to enable systemd-networkd debug logging. Specifically I want to see the log_dhcp_client() log entries in src/libsystemd-...
user avatar
0 votes
0 answers
12 views

Is is possible to avoid init.out logs in logstash?

I got logstash installed on Centos7, and running few data pipelines. Situation is,logstash is creating a default init.out file in logs dir, which is taking a log of space. # du -sh init.out 3.2G ...
user avatar
  • 1,631
0 votes
0 answers
25 views

Log downloaded packages for mirror

We create local package mirrors with debmirror for deb packages and reposync and createrepo for rpm packages. Is there a way to log the names of the downloaded packages and/or overall size and number ...
user avatar
  • 101
1 vote
2 answers
39 views

Log all output and date from my script

I have a run.sh that runs many other scripts with third parties that return output. My run.sh also have some informative echo INFO ... I would like to add something at the top of my script that log ...
user avatar
0 votes
1 answer
34 views

No "notify" category debug log entries anymore with Bind 9.11.3

On old server with Ubuntu 12 and Bind 9.8.1 I got the following "notify" category log entries as expected (domain names and IP addresses redacted): 27-Dec-2021 12:58:51.786 notify: debug 3: ...
user avatar
  • 31
2 votes
1 answer
576 views

Stop rtkit-daemon from spamming logs with "Supervising X threads of Y processes of Z users"

journalctl -b | grep Supervising | wc -l 2819 Distro is Fedora 35, vanilla, with PipeWire running the show. I'm pretty sure all modern Linux distros are affected but people don't care. There's no ...
user avatar

1
2 3 4 5
36