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
1answer
45 views

Email sent to root: “Output from from your job 1843” - “Killed”

I run a Sheevaplug (small ARM server) with Debian 9. It does not have any third-party repos enabled in sources.list / sources.list.d. I have a backup script which runs as root, and uses at. I think ...
1
vote
1answer
299 views

Log Console Output [duplicate]

Is there a way to not only protocol/log the console inputs (like the history), but also the console output by default (without the constant usage of pipes)?
1
vote
0answers
546 views

Howto see messages that are subject to net_ratelimit?

OS: Ubuntu 14.04.3 Kernel: 3.13.0 I am running Linux Virtual Server (with keepalived) on that server. All ok. As of today, there is more network traffic on the LVS, and at the same time I start ...
1
vote
3answers
2k views

Permission to write to log

I'm working on a Python + Django application and it writes logs. As I run app locally, logged-in as my user, I would like to enable my user to write logs to /var/logs. I tried to add my user to ...
0
votes
1answer
48 views

Error in grep command to exit from a Unix Script

I have a log file created while running a script. I want to check the same log file for any messages with 'Msg ....' and exit the code except with this 'Msg 2714'. So, I had added the below code ...
0
votes
1answer
195 views

Logging of failed SIP calls (sipcmd) on a Linux box (Debian)

I have set up a little Raspberry Pi (with Debian 8) behind a router (Fritz!Box), which does check/analyse the connectivity or rather quality of service of a certain phone line per SIP calls. My phone ...
0
votes
2answers
171 views

How to make /var/log persistent through reboots on an embedded linux device

Scenario I am on an embedded linux system. As usual /var/log/ is the directory when all the logs are stored. I have a directory called /safepath which is created during image creation and it is on ...
8
votes
2answers
901 views

System crash - strange chars in syslog

I have a small server which I use for testing and programming. Currently it runs Debian 9.4 stretch with 4.14.0-0.bpo.3-amd64 kernel. Today I tried to connect through SSH but I couldn't then I tried ...
1
vote
0answers
204 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="/...
0
votes
0answers
157 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
3answers
55 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 ...
0
votes
2answers
22 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
52 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
280 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
1answer
221 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
120 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\ ...
3
votes
2answers
104 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
207 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 - ...
0
votes
3answers
47 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" ...
1
vote
0answers
33 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
1k 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
29 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
1k 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
409 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,...
2
votes
1answer
441 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
133 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 ...
-2
votes
1answer
32 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 ...
1
vote
0answers
103 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
167 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
25 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
68 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 ...
0
votes
2answers
411 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
56 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
58 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
310 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
1answer
25 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-...
4
votes
1answer
49 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
88 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
209 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
46 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
31 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
415 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
224 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
24 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
75 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
23 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
16 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
32 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
121 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----- ...
1
vote
1answer
163 views

rsyslog only making log files in /var/logs

Running centos 7, my rsyslog.conf looks like this: 59 # Log all the mail messages in one place. 60 mail.* /var/log/maillog 61 mail.* /var/log/logtest1 62 mail.* /root/logtest Then I use the ...