Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [logs]

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

344 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
181 views

redundant systemd-journal-remote for systemd-journal-upload instances

I'm using systemd-journal-upload on serveral nodes to forward their journals to a single systemd-journal-remote sink, loghost01: /var/log/journal ├── <foo-bar> │ ├── system.journal │ └── ...
1
vote
0answers
1k views

how to know why Linux redhat machine performed reboot

we have cluster with redhat machines version 7.2 on pluto05 machine we saw that machine rebooted before one day uptime 13:51:06 up 1 day, 1:46, 2 users, load average: 0.30, 0.14, 0.08 and from ...
1
vote
1answer
184 views

Saving terminal output to file line-by-line (writing and closing file after every print)

I have a Python script running on a Linux machine which is printing output out to the terminal. Currently, I'm logging this output to a file using the script command. However, the problem with this ...
1
vote
0answers
308 views

Can't change kernel.printk value

I want to set kernel.printk value to 5 4 1 1 for disable logging on booting but when I try sysctl -w kernel.printk="5 4 1 1" I get error: sysctl: setting key "kernel.printk": Invalid argument ...
1
vote
0answers
84 views

Shell command audit for a single user

What is the easiest way to log all the commands ran in the all different shells (bash, zsh...) by a certain user to a file, syslog or somewhere else?
1
vote
0answers
438 views

shorewall logging, but not to syslog

I have a Debian 9.1 installation I'm using as a NAT router. Shorewall version 5.0.15.6-1, linux kernel version 4.9+80+deb9u1. There are two network interfaces. The routing functions are all working ...
1
vote
0answers
61 views

Can't find boot log information

From time to time I experience a long delay during my Debian 9 boot with the "Failed to connect to lvmetad." message. After booting, I want to get details about the problem, however can't find any ...
1
vote
0answers
260 views

Why can't customize sshd log info as sshd.log?

My os info: cat /proc/version Linux version 2.6.32-042stab127.2 (root@kbuild-rh6-x64.eng.sw.ru) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Thu Jan 4 16:41:44 MSK 2018 I want to ...
1
vote
0answers
135 views

Can I exclude some clients from BIND query logging?

We have some BIND DNS servers we are thinking of shutting down. I turned on query logging to see which clients are contacting these servers. The vast majority of entries are from three known culprits....
1
vote
2answers
796 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 --...
1
vote
1answer
1k views

How to log only iptables messages into my /var/log/iptables.log?

I want to log only iptables message into /var/log/iptables.log. Here is my way. sudo vim /etc/rsyslog.conf kern.* -/var/log/iptables.log sudo vim /etc/rsyslog.d/iptables.conf :msg, startswith, ...
1
vote
1answer
386 views

Changing directory of logs

I'm trying to configure a central syslog server running rsyslog. I've set up the configuration so that it is capturing the firewall logs from our Cisco router. We have an NFS share attached to the ...
1
vote
0answers
314 views

iperf daemon not outputting anything to log file

According to documentation, iperf (v2) server can be run in daemon mode and send its output to a log file like this: iperf -s -D > iperflog I'm running that command exactly, as a regular user, ...
1
vote
1answer
459 views

How to journal command after sudo?

How to configure Linux to journal all command entered by a user after they use sudo su - or sudo su - username ?
1
vote
0answers
1k views

maxage option in logrotate not working as expected

I am rotating my logs using logrotate in linux. I want to remove my logs older than 7 days. So I tried maxage option in logrotate but it is not working as expected. Let say I have 6 logs which is ...
1
vote
0answers
528 views

Files in /var/log are only writing to file.1 (syslog is empty, but not syslog.1 )

The host is a docker container running Ubuntu 14.04 I am trying to figure out why the primary log files are not being written too, I have attached output of the files and permissions. I am hoping to ...
1
vote
1answer
709 views

Suppress systemd: “Directory to mount over is not empty, mounting anyway.”

I am purposefully mounting a read-write copy of a directory on top of the read-only version of itself. This generates a log message such as: Aug 27 14:31:02 svelte systemd[1]: mnt-btrfs\x2dvol-...
1
vote
0answers
516 views

How to view httpd response log?

I have an Amazon Linux EC2 instance running as my webserver. If I view the latest access logs by running sudo tail /etc/httpd/logs/access_log I can see that there are requests coming from IPs that ...
1
vote
1answer
1k views

Change timezone for logging

On a new server, I've changed timezone from UTC to my local timezone, Europe/London: sudo ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime That gives me the desired time when, for example, I ...
1
vote
0answers
309 views

How do I fix debian jessie shutdown error?

I recently got a pc and I installed debian jessie. And everything is going well, the problem is when I try to shut down the pc, because it freezes, the same happens if I try to restart, suspend. The ...
1
vote
0answers
258 views

calculate response time from log timestamps entries

I am new to this scripting world, and trying to learn things in my limited time. Could someone help me compose a script that will get me response time from my log. The current log format is: 2017-...
1
vote
0answers
288 views

Enabling custom auditd logging in RedHat

I enabled the auditd service using the following configuration to trace all user activities (belonging to group ID 555) on RedHat OS: vim /etc/audit/audit.rules -a always,exit -F gid=555 -F arch=b64 -...
1
vote
0answers
2k views

journalctl: unrecognized option '--vacuum-size= '

All environment info on my os. debian8@debian:~$ uname -a Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux debian8@debian:~$ systemd --version systemd 215 +PAM ...
1
vote
0answers
144 views

Rsyslog and ACL

I'm redirecting log to /var/log with rsyslog, in order to let apache read the files, including new created files and directories i used ACL, in parent folder i did this : setfacl -d -m u:httpd24:rx ....
1
vote
0answers
201 views

Are these BIND update forwarding errors safe to ignore?

I recently replaced my CentOS 5 authoritative BIND servers with CentOS 7. Everything is working fine, but my logs show some weirdness. I use a hidden master and my primary and secondary name servers ...
1
vote
0answers
735 views

Kill an existing TCP connection quickly

I'm working on a pentesting project, and I have the following setup: I have an SSH daemon that is trying to log all of the activity happening on SSH connections out to another server. I'm trying to ...
1
vote
0answers
231 views

Changing default log dir of btmp and wtmp

I've mounted my external drive which serves as different log dir. Everything is configured to write to my external location named /var/log_external, and I am wondering, is possible to change default ...
1
vote
0answers
26 views

How to initiate process for a script via cronjob, monitor status, and log execution time

How to initiate process for a script that will run via cronjob, then monitor the status, and log start and stop run time. Any code snippet will be helpful... Thanks
1
vote
1answer
34 views

Log if Process takes more than X Amount of Ram

I own a root server and I would like to log, if any process uses more than X-amount of Ram. Does anyone know a good script or an existing program for that?
1
vote
1answer
589 views

Lines per second script

I have about 800 log files and I'm trying to write a script that reports the counts of lines per second or "requests per second" in each log file and reports the output which includes the timestamp ...
1
vote
0answers
49 views

Logging an event for CD creation?

How can I tell from Linux logs (Red Hat in particular) that a user burned a CD? Does Linux log an event or events when a CD is burned from the built-in burning solution (or other burning software)? ...
1
vote
0answers
71 views

Networking with Graylog in Qemu?

I want to run Graylog inside a qemu VM, then send it logs and access its web interface from the host OS. First I created a Debian Jessie VM and installed Graylog using their official guide, then I ...
1
vote
0answers
126 views

Catching a crash

I am running Fedora 25 on a reasonably recent beefy computer. This is a Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz with 16 cores and 64Gb RAM on kernel 4.8.11-300.fc25.x86_64. However, every so often ...
1
vote
0answers
129 views

What does this UFW entry mean?

I've found this recent entry in ufw.log: RaspberryPi kernel: [1046588.133562] [UFW BLOCK] IN=wlan0 OUT= MAC=mac_address SRC=0.0.0.0 DST=224.0.0.251 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2 My ...
1
vote
0answers
357 views

View logs for non-interactive shell script?

I have some scripts that work perfectly when I invoke them directly but not when invoked via a keyboard macro. I've tired looking at bash logs and history but I don't think those locations only show ...
1
vote
0answers
49 views

Apache analytics with virtual hosts

I've found various open-source tools (such as goaccess.io) that can turn an access.log or other_vhosts_access.log into a unique visitors analytics: 739 visits 16/Oct/2016 804 visits 15/Oct/2016 ...
1
vote
0answers
659 views

dhclient logs flooded with useless information

I am using dhclient on Debian (isc-dhcp-client, isc-dhcp-common). The logs that dhclient is logging are flooded with copyright information and other useless stuff ("please consult README", "please ...
1
vote
0answers
75 views

Log internet access

For a WiFi hotspot I want to record each guest's internet access. Not the full data, only source/dest/timestamp/duration. I didn't found any open source software to do this. Question 1: does someone ...
1
vote
0answers
2k views

Why my logrotate is not working?

I'm trying to rotate my application's log daily, but for some unknown reason, it's not working. If I debug its logrotate definition, it says that it won't rotate it. However, only when I force its ...
1
vote
1answer
365 views

Configure masscan to leave user agent in server logs

I'm trying to configure the nmap-like program masscan to leave a useragent (and all the other usual info that comes along with the useragent, but the useragent is what I'm most concerned with) in the ...
1
vote
0answers
241 views

Adding the related username to syslog logging

I'm managing a server running Debian 7 Wheezy. I'd like to add a new feature to the /var/log/syslog file. That is a sample current output: Jul 31 13:06:35 myserver mod_evasive[7629]: Couldn't open ...
1
vote
1answer
184 views

Bushound alternative for Linux for SCSI logging

I was wondering if anyone knew of a good solution to logging specific SCSI device traffic on Linux? Does anyone knew of a comprable Linux alternative to Window's Bushound? I have looked at already ...
1
vote
1answer
105 views

how to get /log fS usage in two remote servers

how to trigger mail with below format by getting df -h /log fS usage server1 | server 2 75% | 50% Below are step how i check FS usage manually login to putty ssh server1 give the ...
1
vote
0answers
61 views

Send new login & logout logs to a database

I want to know how to send new login and logout logs to a database. I know that last command outputs the "lasts" login info. But, I found the following problems: How to filter to only get new logs? ...
1
vote
0answers
66 views

rhel - file modification logs

I found a strange file in my /home/user named FireZeMissiles1111.tmp. I am the sole user and did not create it, so it is kind of suspicious. It may have been left there by a program who's programmer ...
1
vote
0answers
896 views

Fail2Ban - Failed to execute ban jail 'xxx' action 'xarf-login-attack'

I recently set up Fail2Ban (v0.9.4 on Debian Jessie). I only use it for SSH. By default my main jail bans after 5 failed attempts in 10 minutes for a day. This setting has worked well for me however ...
1
vote
0answers
212 views

On Ubuntu - /var/log/messages timestamps are 4 minutes ahead

As mentioned in the subject, timestamps in my /var/log/messages are 4 minutes ahead comparing to my desktop clock or the date command. If it was an hour, I would think this is a timezone issue, but ...
1
vote
0answers
661 views

sar/sysstat output logs to a 2nd directory

We're running RHEL on one server and I need to report some stats about the machine. sysstat/sar does a great job but I need the logs to report starting with 6am until next morning at 6am and output ...
1
vote
0answers
76 views

Log on standard output

I'm using Debian Jessie and I'm having big init.d script which starts or stops variety of daemons (more than 10), which list is taken from configuration file. Using systemctl restart parstart.service ...
1
vote
0answers
455 views

mod_evasive : White-listing causing to not having Access Logs?

I'm using mod_evasive with Apache. And there is an directive to whitelist the IP(s). Like: DOSWhitelist 127.0.0.1 DOSWhitelist 10.0.*.* DOSWhitelist 100.200.*.* This is fine because we need to ...