Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [logs]

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

0
votes
0answers
9 views

macOS Login Events

I'm looking for a way to track what username was used to log into the iMacs in our environment. I also need to know the date/time and whether the login was successful or not. I'm looking then to log ...
1
vote
0answers
29 views

Understanding Linux audit.logs for SSH - USER_AUTH

Let's say I have this entry in my Linux audit.log: type=USER_AUTH msg=audit(1357702397.903:2747564): user pid=15121 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication acct="test" exe="/...
-1
votes
0answers
34 views

How can I view linux server logs with web browser?

I am using a rsyslog server on centos 6.8 which I gather all the logs I need from our servers and I need to give permission to another team to view these logs via a web browser. Is there any tool ...
0
votes
0answers
13 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
23 views

Redirecting output of loggings when using <syslog.h>

How can I redirect the message this code writes in /var/log/auth.log to /var/log/test.log #include <syslog.h> int main(int argc, char** argv) { char* cap = "TEST 1"; openlog(cap, ...
1
vote
0answers
23 views

rsyslog filtering on syslog server

I have below relevant logs in default file /var/log/messages: 1 2018-10-07T01:32:20.898Z TestFW2 RT_FLOW - RT_FLOW_SESSION_CLOSE [junos@2636.1.1.1.2.34 reason="idle Timeout" source-address="100.73.10....
4
votes
3answers
54 views

find IDs of databases with error during upgrade

I have a log file of errors captured in my database, the file contains a list of the records that had errors and were not updated. The record names are 10 digits and start with a strA: Error: could ...
2
votes
2answers
16 views

caclulate total log in time to network

I have this log file which is recording the log in/ log out sessions by users to the network [10:21:10] User logged in [13:59:42] User logged out [15:42:00] User logged in [16:42:13] User logged ...
0
votes
0answers
29 views

Logging output of scripts called inside another script

Inside bashscript, I am using exec and tee to redirect logs to stdout and a log file in the same time - Unix & Linux Stack Exchange. exec &> >(tee -a "${LogFile}") I am sourcing ...
1
vote
1answer
60 views

Deployment of haproxy between devices and Syslog server

Below is the current architecture of Syslog-NG to avoid single point of failure. Currently devices send same syslog message to two syslog servers listening on UDP port 514. Each server stores the ...
1
vote
0answers
18 views

Getting multiple hits for wpad.dat file

I have a web server running with nginx. Recently am getting multiple hits for the file /wpad.dat which is not existing in the server. Is someone trying to hack my web server? Also I have tried to ...
1
vote
1answer
62 views

Message forwarding with de-duplication - SyslogNG

Based on the advice from answer that says: Simply adding both servers and always write to both is the easiest one, we have setup syslog-NG server on two machines that receive same syslog message and ...
1
vote
0answers
51 views

Odd Characters in Log File

I checked my cron log files today for a script that I have scheduled and the saw the following errors/characters: \00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\ ...
0
votes
2answers
40 views

How do I grep for occurences of “[numberLargerThan5000]ms”?

I have a .log file where each entry is on the form 2018-09-28T10:53:48,006 [Jetty-6152 ] INFO [correlationId] my.package.service:570 - Inbound request: 1.2.3.4 - GET - 12342ms - 200 - /json/some/...
2
votes
1answer
49 views

awk/sed/grep: Printing all lines matching a string and all lines with tabs after these lines

I want to extract relevant data of an http thread which has been started with a specific UUID from a log file. Example log: 2018-09-26 06:34:24,815 INFO [com.xxx.xxx.xxx] (http-threads-threads - ...
1
vote
3answers
36 views

Search multiple patterns in each lines and output it on a new file

Here is the sample file. The actual log is way bigger than this. user@linux:~$ cat log.txt [24/09/2018:22:41:49 GMT] "PROXY_SERVER_BA2" c-ip=x.x.x.x cs-bytes=1198 cs-categories="Technology/Internet" ...
0
votes
0answers
27 views

Log format documentation

I'm trying to create a log format for goaccess so it can parse my nginx logs but it's failing and I can't find the documentation on what the the placeholders mean in the first place. Where can I find ...
0
votes
1answer
46 views

can i safely remove /var/log/jenkins/jenkins.log (/var: 100% used) [duplicate]

I am running out of disk space with /var system file and noticed /var/log/jenkins/jenkins.log file is occupied 7 GB. Can i safely remove this log file ?
1
vote
0answers
10 views

Syslog is flooded with PF_RING messages

I have ntop running on a Debian 9 (Stretch) server, and it's flooding /var/log/syslog with the following messages every 10 seconds: Sep 21 11:51:18 brutus kernel: [67801.273760] [PF_RING] removing lo/...
1
vote
1answer
53 views

Is “find /var/log -type f -delete” safe on Debian 9?

I never view or care about files in /var/log/ and want to avoid logrotate wasting my system resources (CPU, RAM, I/O, etc.). Are any regular files in /var/log/ necessary for some core Debian program (...
0
votes
1answer
33 views

How to omit PAM log messages for specific user (pam_succeed_if quiet)

I'm using a monitoring agent (telegraf) to monitor fail2ban. Unfortunately, it requires SuperUser rights to execute fail2ban-client, which causes 24 system log messages every 10 seconds... Do the math,...
1
vote
0answers
39 views

Make sendmail not log “did not issue MAIL/EXPN/VRFY/ETRN” messages?

We have sendmail servers behind an F5 load balancer. The load balancer is constantly opening/closing a connection to each mail server to see if it is answering. This means our syslog files are ...
0
votes
1answer
27 views

How do I relate to huge auth.log and fail2ban.log files?

I have a question regarding log files on a Debian box. I'm running a low volume PHP server, so most log files are small. However, auth, fail2ban (and daemon) are huge, even with log rotation. 2000K ...
-3
votes
1answer
28 views

revising log files [closed]

I am checking the log on a server multiple times throughout the day. Each time, I open the log in NotePad++ and search for key words such as "warn" or "error" and then review the error or warning to ...
0
votes
0answers
45 views

Command works on cli, but not on crontab

I have script that is doing an iperf3 test against a server and is piping it into a file. Then I have this command, that takes makes a line for a logfile. It works when executing on the command line, ...
0
votes
0answers
13 views

delete csv file by rsyslog after transfer

We have two expectations from the rsyslog. we config : module (load=imfile) input (type="imfile" file="/opt/reports/*.csv") tag="send_csv" ruleset="test") ruleset(name="test") { action (type="omfwd"...
1
vote
0answers
34 views

Rsyslogd - remove timestamp on certain logs

I'm trying to achieve the questioned here, but I need to discard the timestamp only on a specific log file. I.e. only /var/log/mylog.log should have no timestamps. Is that possible with rsyslogd?
0
votes
0answers
28 views

LogStash Json ParserError

I need to send a log with JSON format from rsyslog to logsatsh and then from logstash to graylog. All the steps I have done. step 1 : config /etc/rsyslog.conf *.* action(type="omfwd" target="192....
0
votes
1answer
19 views

Can I log user input and program output separately for a terminal session?

I wish I could make script work like this: ❯ script --user=call.log --prog=response.log Script started ❯ echo foo foo ❯ exit Script done ❯ cat call.log echo foo ❯ cat response.log ...
1
vote
1answer
30 views

using VFS to do dynamic mounting

I have what may sound like a strange situation. I have a mount point for a directory containing a variety of log files. From time to time it is necessary to unmount this directory and remount it in ...
-1
votes
2answers
30 views

Empty all log files in a directory

I recently came across this page that indicates how to empty a file. How can I do it for all files in a given subfolder ? For instance, by using > file.log to empty a file ? I basically want to ...
0
votes
1answer
28 views

Log all console output in real time

I would like to log everything printed to my console in real time. What I mean by this is that I need to be able to view the log file while the logger is running. To my understanding, script output....
1
vote
1answer
48 views

netconsole prefixes every message

I just enabled netconsole on my Ubiquiti wireless LAN access points. They run a custom OpenWRT or LEDE version, based on Linux Kernel 3.3.8. It works, but the message it sends always contains an ...
1
vote
1answer
37 views

python script output won't be directed to file

I have a python script. It has a SimpleLogger with sys.stdout as output_stream. logger = SimpleLogger(level=LogLevel.DEBUG) When I run it in console, I get the logs properly, but whenever I ...
0
votes
0answers
38 views

Kernel messages in messages log have wrong timestamp. How can I correct CLOCK_MONOTONIC drift without rebooting?

We have a bunch of linux nodes out in the field running a 2.6 kernel. hostname:~# uname -a Linux hostname 2.6.23.1 #1262 Fri Nov 29 07:11:22 EST 2013 armv5teb GNU/Linux Most of them have an uptime ...
0
votes
1answer
19 views

how to send lines/messages to maillog file [closed]

under /var/log , we can see the following maillog files -rw------- 1 root root 11733421 Aug 5 03:47 maillog-20180805 -rw------- 1 root root 15566137 Aug 13 03:16 maillog-...
0
votes
0answers
13 views

Redirecting /var/log/appname to a more accessible location

I have a dev server at work that's decently locked down. However, the application mean to be debugged here only logs to /var/log/appname/[objecttarget]. The object target can change regularly, so I ...
4
votes
1answer
28 views

Where should I put ownerless log file

I have a script that moves in and out of using sudo. Certain commands have to be executed as $USER and certain commands have to be executed as root. Currently, I'm running a loop in the background ...
1
vote
0answers
17 views

Remove new line in Postgresql log before sent to Graylog

i want to remove all new line in Postgresql log before sent them to Graylog. Example, 2018-08-30 00:00:00 WIB [29212] hi_user@myDatabase 172.21.253.44 LOG: duration: 1044.000 ms execute 32: ...
0
votes
1answer
21 views

atop + what define when /var/log/atop/atop_log should be created

today I installed the atop tool ( before two hours ) in order to trace the OS performance rpm -i atop-2.3.0-8.el7.x86_64.rpm atop -V Version: 2.3.0 - 2017/03/25 09:59:59 <gerlof.langeveld@...
-1
votes
1answer
28 views

Error Displaying last 10 minutes log with awk [duplicate]

I am using below command to display log data for last 10 mins. It works fine if the month stays same however when month is changed it doesn't show any data. awk -v d1="$D1" -v d2="$D2" '$0 > d1 &...
0
votes
1answer
20 views

Lubuntu: reboot-log-entries don´t seem to be correct

I´ve recently taken a look at my reboot-logs with last -x | grep reboot : reboot system boot 4.4.0-134-generi Tue Aug 28 12:20 still running reboot system boot 4.4.0-134-generi Mon Aug 27 14:...
0
votes
1answer
68 views

Bash script to monitor log, match keyword then send commands [duplicate]

#!/bin/bash sudo tail -fn0 /home/main/time.log | grep -o --line-buffered 'garage\|garden\|porch' | head -1 | while read line; do sudo pkill -f porch.sh & sudo pkill -f garage.sh & done I'...
1
vote
3answers
98 views

Display lines in last 10 minutes with specific pattern in logs

I need to display lines with Error occurred in last 10 minutes of a log file. Aug 26 10:50:42 Normal line. Aug 26 10:51:23 Normal line. Aug 26 10:55:33 Error line. Aug 26 10:56:45 Normal line. Aug ...
0
votes
0answers
22 views

Get readable terminal log during python program execution [duplicate]

I'm trying to redirect the output of a python program using script command from a gnome-terminal. $script ~/Documents/log.txt $python test.py But the saved file log.txt is unreadable. It's like: ...
0
votes
1answer
57 views

bash script output not written to file in folder

My goal is to run a script in crontab and save its output (via echo commands) to a log file. Thus, I am using the following: $HOME/folder/sh/script.sh 1>$HOME/folder/logs/script.log 2>$HOME/...
0
votes
0answers
21 views

Redirect output to a file creating old.gz after some time

I am redirecting my Java process output to log file as below nohup java myRunnable.jar &> /varlog/runnableJar.log & Program working file, but after some time we can see that new file ...
0
votes
0answers
7 views

Logrotate File Numbering [UBUNTU 14.04]

root@osshonisyslog1s:/var/log/upstart# ls -Anh | grep graylog-server && vim /etc/logrotate.d/upstart -rw-r----- 1 0 0 3.0G Aug 21 11:32 graylog-server.log -rw-r----- 1 0 0 1.1G Aug 21 11:26 ...
0
votes
1answer
15 views

Logrotate Timing?

I've configured logrotation and it works the way I want it to when I force the update. I'm using the filesize condition as you can see in the config below, but I'm wondering how often this condition ...
0
votes
1answer
24 views

Upstart Logrotate?

What's wrong with my config? I had to --force the logrotate a couple times to see changes, but the numbering is all wonky. ----@----------:/var/log/upstart# ls -Anh total 4.0G -rw-r----- ...