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
0answers
15 views

Log from running script sometimes appears as if it is HTML

I have a script that starts either at 00:10 or on reboot, currently running on my NAS. To make sure it was doing what I wanted I have been logging the output. I've tried various methods of writing to ...
2
votes
2answers
2k views

SUDO I/O logs and TSID

I trying to understand the details of sudo session logs, specifically about TSID. I have a few questions: What does TSID stand for? It is a 6 character sequence which forms the directory structure - ...
23
votes
5answers
49k views

How can I track who SSH'es into my linux machine?

I'm running Ubuntu 10.04. Is there a way I can get a daily report of who has logged onto the box, what time, and even - this may be asking too much - a report of the commands they used? This is a low-...
-3
votes
0answers
38 views

how to recover deleted /var/log/auth.log

yesterday I did fail2ban and set logwatch settings as recommended in the instructions, and after a system reboot I lost entries /var/log/auth.log I tried 100 different tips helps nothing. How to ...
0
votes
1answer
14 views

searching logs for failures using grep with wordlist?

I am building a wordlist which will contain words like error,fail,kill,warn,out of,over,too.....etc. so that I can filter tons of logs for issues within seconds using grep. Especially, it's for ...
0
votes
0answers
18 views

How to determine which Linux job is hanging my machine at midnight

I have a job that is hanging my machine shortly after midnight (minutes). It doesn't happen every night, more like every 5-10 days. I have a few basic scripts that I have running, but none are set to ...
2
votes
1answer
64 views

Difference between “install” and “installed” in dpkg.log

Some recently installed packages appear like so: [date] [time] install [package name] [date] [time] installed [package name] but some packages (e.g. man-db which I haven't manually installed) appear ...
0
votes
1answer
3k views

Grep /var/log/maillog for email to a certain user, based only on his linux username

I have a learning environment, based on Linux CentOS, with Postfix and SquirrelMail running, but my assignment is more in general. I need to find in the maillog e-mails received by a certain user ...
0
votes
1answer
13 views

How to make a logfile of the files being transferred to some other server

I have a scenario where I am receiving multiple files in a directory and I need to transfer those files received in 60 mins to some other server. So for that I use below command. { find -maxdepth 1 -...
0
votes
0answers
20 views

Why does journalctl for a service file running a shell script include more than is output to stdout?

In a unit-file for systemd (that is to say myservice.service file) I run a script that runs an infinite loop checking something on the system. It calls a function every 5 seconds or so and uses awk ...
3
votes
2answers
5k views

Log the output of Expect command

I have made the below expect script and I need to log the output of that script. SOURCE_FILE=`ls -l *.txt --time-style=+%D | grep ${DT} | grep -v '^d' | awk '{print $NF}' ` if [ -n "${SOURCE_FILE}" ] ...
3
votes
2answers
7k views

Where is the postfix Mail Delivery Status Report?

I'm using CentOS 7. I wanted to test my PostFix mail forwarding so I ran [root@server /]# echo "Subject: sendmail test" | sendmail -v admin@mydomein.com Mail Delivery Status Report will be mailed to ...
0
votes
0answers
8 views

explanation of SAMBA 4 log level

in RHEL 7 having Samba-4.10 I am following https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html for understanding how to specify the log levels. It leaves a lot to be desired. I don't ...
1
vote
2answers
3k views

ACPI error message AE_NOT_FOUND. Why is this happening now? It did not happen previously

I have used Linux on my PC for a long time. Some time recently, there is a new kernel error message on the text console. It also appears as a message in red in journalctl -p err. It did not appear ...
0
votes
0answers
10 views

prevent sudo log_output from storing stdout

I am trying to log what users are doing wuth sudo. On the same time I do not want to record their passwords in normal situations. So using log_output seems like a good way and it basically does most ...
1
vote
1answer
18 views

How can I rotate old systemd journals to a different filesystem?

I want to limit the size of systemd journals (in /var/log/journal) by moving old journals to a different filesystem. I know of the setting SystemMaxUse in /etc/systemd/journald.conf which makes it ...
1
vote
2answers
1k views

how to assign log as a variable in bash

I want to assign log output to "line", I tried the following line=tail -1000 /var/log/syslog but it doesn't work. myscript is like below #!/bin/bash line=`tail -1000 /var/log/syslog` d1=$(date --...
0
votes
0answers
24 views

Why is my Intel NUC dying when watching H265?

I've been using my BOXD34010WYKH1 Intel NUC for over 5 years now as my media center. It's been attached to my TV, running LibreElec (Kodi). I've watched many h264 1080p videos on it, streamed over the ...
0
votes
1answer
5k views

Cron stopped logging to /var/log/cron.log

A month ago I set cron to log to /var/log/cron.log by modifying /etc/rsyslog.d/50-default.conf. Logging worked great until I changed permissions on /var/log (by easing permission restrictions), and ...
9
votes
1answer
486 views

What is the difference between /proc/kmsg and /dev/kmsg?

I am learning about journald and rsyslog and while reading I saw that rsyslog reads from /dev/kmsg and that journald can read from both /dev/kmsg and /proc/ksmg. I know these are both kernel logs, ...
1
vote
1answer
30 views

have script triggered by udev that runs forever

I need to log output from /dev/ttyUSB0. This is how I start the start-log script on a connection pi@raspberrypi:/etc/udev/rules.d $ cat 50-text-log.rules ACTION=="add", SUBSYSTEM=="tty", ATTRS{...
65
votes
5answers
143k views

Where are my sshd logs?

I can't find my sshd logs in the standard places. What I've tried: Not in /var/log/auth.log Not in /var/log/secure Did a system search for 'auth.log' and found nothing I've set /etc/ssh/sshd_config ...
2
votes
3answers
1k views

Is there any PF log parser for FreeBSD

I am runing FreeBSD 8 stable with PF as firewall, I am looking for any tool for parsing PF log's.
2
votes
1answer
1k views

Does journalctl give access to all logs?

In my university we studied about rsyslog, and how it stores logs and where it stores them (/var/log/), and how to configure it ... Now, I learned (by surfing on the internet) that a new way of ...
1
vote
2answers
2k views

Grep --line-buffered, can I search the same buffer with the results of the first grep?

I'm searching a log file in the following format <date> <connection from: ip> <new connection ID> <info> <date> <connection ID> <info> I'm using the ...
91
votes
3answers
202k views

what is the CentOS equivalent of /var/log/syslog (on Ubuntu)?

On ubuntu this file exists: /var/log/syslog. However the same file does not appear on CentOS Distributions. What is the equivalent file on CentOS?
1
vote
1answer
41 views

Recover accidentally flushed logs file

I have an Apache Tomcat running on CentOS7 server which had a file catalina.out of around 157MB in size. I was trying to download that file on my local system so I ran the tar -czf command but I ...
0
votes
1answer
36 views

Why am I still seeing old log files and not having new ones?

This is my setting logrotate /home/sy/logs/kitxit*/*/tend.log { daily rotate 10 dateext compress delaycompress copytruncate missingok ...
0
votes
1answer
32 views

Is UDP data lost when executing kill -HUP on rsyslog?

I am very new to rsyslog and I am going through the documentation as well as seeing examples of what other people have done with their configuration and a question came to mind when the topic of log ...
12
votes
4answers
47k views

Appending timestamp stamp along with log file lines

I have a log file and I need to append timestamps to each line as they get added. So I'm looking for script that appends timestamps to each entry in log lines and which could run as a cron job.
1
vote
1answer
1k views

VSFTP user login & activity monitoring

We have a linux box that is configured with vsftp for our ftp sessions. Unfortunately, for the last few days, we've found that files served by vsftpd have been lost (deleted). I would like to know: ...
0
votes
1answer
413 views

How can I make syslog-ng to filter for a user name?

I've found a nice feature of the syslog-ng: if I use the logger to log things from the user process, I get the logging user name. Around so: peterh$ echo test log message|logger then I get this in /...
0
votes
0answers
26 views

How to diagnose crashing/freezing on Linux

I'm having issues with Zorin OS Ultimate where by the system will freeze/crash. I installed the OS last Friday 24th April and I have had four system crashes since. First one was when using Chrome, ...
0
votes
1answer
15 views

configuration of log file

For Solaris there is a file called /etc/default/su which tells where the sulog data is stored and the file name as well.. Like wise do we have any file on AIX, RHEL6 , RHEL 7 and HP-UX to identify in ...
18
votes
4answers
58k views

Does HAProxy support logging to a file?

I've just installed haproxy on my test server. Is there a way of making it write its logs to a local file, rather than syslog? This is only for testing so I don't want to start opening ports / ...
3
votes
2answers
3k views

How can I debug Nautilus crashes?

Is there a log file I can peruse, or settings somewhere that might give me a clue? I'm running GNOME nautilus 3.14.3 ("Files") in Ubuntu 16.04.
6
votes
2answers
17k views

Output progess of the scp/sftp command to both standard out and a file on linux server

I am writing a release script, which uses scp/sftp to get the the file from a remote server, we want to log the output of this script to a release.log file as well. I am using "tee" to achieve this, ...
-1
votes
1answer
22 views

bash won't exit on error if a program's output is redirected to log file

#!/bin/bash exec 200>/var/lock/scraper || exit 1 flock -n 200 || exit 1 cd /home/ubuntu/web_scraper /home/ubuntu/.nvm/versions/node/v13.12.0/bin/node mongo/scraper.js > logs/scraper.log ...
3
votes
1answer
1k views

iptables: LOG is not a valid target

I'm learning to configure firewall rules using iptables. For some reason, iptables does not recognize LOG as a valid target: ○ sudo iptables -A INPUT -p icmp -j LOG iptables: No chain/target/match by ...
0
votes
1answer
16 views

Save “unseen” output of command to file

I have a program that returns some content every time I run it. Some of that content may have already shown during the last run. foo bar baz and on next execution it might show two "old lines" and ...
1
vote
1answer
1k views

IPtables logging is not working in CentOS 7

I want to log all the traffic which comes in and out from the port X. I have followed below steps. Edited /etc/syslog.conf , /etc/rsyslog.conf , /etc/systemd/system/rsyslog.service.d/rsyslog.conf ...
189
votes
4answers
796k views

Where are Apache file access logs stored?

Does anyone know where file access logs are stored, so I can run a tail -f command in order to see who is accessing a particular file. I have XAMPP, which is an Apache server installed on my machine, ...
3
votes
3answers
104 views

What is the command to copy, read and remove file in linux

I want to copy some files from root directory (/var/log/) to home directory(home/test/copyfromlogs/) and after that i want to remove those files from root directory. The files I want to copy are ...
0
votes
3answers
55 views

How can I use sed\awk to look for certain lines within a file, and then match all subsequent lines that match a different pattern?

I have found a similar topic but could not figure out how to implement it for my own use: grab multiple lines after a matching target line Here's the issue: I'm trying to implement it on a project ...
2
votes
0answers
50 views

Rsyslog and Journald - Log processing in Linux

I do not really understand the forwarding from Journald to Rsyslog. Basically I understood it in the way that the 'pipeline' is built up as follows: Kernel logs through printk() → /proc/kmesg ← ...
0
votes
1answer
23 views

Any way to tell where log output is coming from?

On a unix system, I have a file in /logs which is being written to constantly by multiple sources. Is there a way, maybe with tail(?), to determine what processes are writing to this output?
32
votes
3answers
84k views

Where are sudo incidents logged?

When someone is not in the sudoers group and try to use sudo, get an error message like this one: yzT is not in the sudoers file. This incident will be reported. I'm trying to figure out in which ...
0
votes
1answer
1k views

Logs of the command running in the remote machine using ssh

I am sshing into a remote machine and running a command there using sudo. I am using tt for TTY connection. I want to get the output (the console logs) of the command that I am running in my local ...
0
votes
1answer
18 views

Rsyslog not saving logs from another servers into custom directories

I am receving logs on UDP 514 from another server and i have configured rsyslog.conf to save the logs to another custom directory but i am unable to do so, i confirmed through tcpdump logs are getting ...
0
votes
1answer
30 views

what do I do if linux doesn't create the var / log / journal directory despite rebooting with systemctl?

I need help, the journal service was not configured correctly with systemctl restart systemd-journald.service, since I want to protect journal files with storage = persistent,but linux does not create ...

1
2 3 4 5
32