Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
626 views

How to get new generated file name on logrotate?

I want to get new file name generated by Logrotate and run a script on it. Logrotate has an event called Postrotate() with a parameter called '$1' but it returns the original path file name for ...
Amintabar's user avatar
  • 101
2 votes
1 answer
2k views

Is there any way to delete logs of a specific systemd service in linux?

After searching a bit, all I got is journalctl --vacuum-time.... However, this command doesn't delete service logs. So, how can I safely delete logs of a specific service from linux?
William's user avatar
  • 601
0 votes
0 answers
67 views

Linux log grows large, resets, does it again

Am running Ubuntu 18 and don't have a ton on their for apps. The hardware is setup with one 120gb SSD as root/boot and the rest of the drives as 2 pair of raid drives where media files, etc... reside. ...
Mark's user avatar
  • 113
1 vote
1 answer
2k views

Redirecting the output of service in Ubuntu to Log files

I am on Ubuntu 16.04 and deployed a service in /etc/systemd/system. The service file booster.service contains [Unit] Description = booster After = network.target [Service] ExecStart =/opt/tech/...
karra's user avatar
  • 11
0 votes
1 answer
273 views

Is it safe to remove read rights from all /var/log files for others?

Am I supposed to be able to revoke read access recursively to /var/log/ for others or will it break some applications which rely on being able to read from /var/log/ with other rights?
Senkaku's user avatar
  • 612
0 votes
3 answers
2k views

How to record stdout and stderr with different tags in syslog?

I can redirect both stdout and stderr to logger this way: ./myprog 2>&1 | tee /dev/tty | logger but I would like to be able to tag each log entry with "myprog-out" and "myprog-err" based on ...
Sparkler's user avatar
  • 233
2 votes
1 answer
4k views

Log rotation with compression?

I'm running a process on Linux (CentOS 7) which produces a lot of output on stdout. Sending it all to a file will result in a file size greater than 1 TB. But happily the output is quite compressible -...
LangeHaare's user avatar
1 vote
1 answer
3k views

The log files are empty

I found out that my /var/log/messages is empty! Also my /var/log/auth.log is also empty! Also it is not logging any messages. My /etc/rsyslog.conf file is as follows: # /etc/rsyslog.conf ...
Lublaut's user avatar
  • 181
3 votes
1 answer
3k views

System logs written to an NFS mount

Today we had an issue with a Linux server that filled (100%) it's entire root (/) partition due to a misconfiguration in postfix that led to a huge /var/log/syslog file and yesterday we started using ...
Gonzalo Vasquez's user avatar
1 vote
1 answer
360 views

Using "tee" to selectively log Ubuntu terminal output?

I need to log terminal output. But I only need some outputs which starts with a keyword (say starts with "error"). I use something similar to: ls | tee "log.txt" In this example command I do not ...
None's user avatar
  • 559
0 votes
0 answers
40 views

How do I log the execution of programs within a directory regardless of shell?

I'm curious when exactly a particular directory is being used and when it is loaded into memory. Is there a way to place a low level hook in the linux file system that says when a file with execution ...
John Drinane's user avatar
-2 votes
1 answer
5k views

Rsync returns “such file or directory” when running command

I am new to Linux and I am using rsync in order copy logs from one server to another but the command I am running says directory not found. What is going wrong? 001 rsync -u -avze ssh /apps/container-...
prashanth kool's user avatar
0 votes
1 answer
4k views

Log messages containing a specific string to another file in rsyslogd

I want to save my log messages generated by iptables to another file via rsyslogd. Currently I use this code from /etc/rsyslog.d/20-custom.conf: # Log cron to cron.log and not to syslog *.*;cron,...
Chris's user avatar
  • 153
0 votes
1 answer
90 views

Strip off previous lines in tail or less

I'm using tail -f or less +F to observe a changing log-file. I know from a certain point the lines I'm looking for are going to appear. So all that garbage before that point I don't require and would ...
Qohelet's user avatar
  • 155
16 votes
1 answer
22k views

How to follow systemd unit log?

I have a running systemd unit and I want to follow it's log. I know I can show unit's log by using: journalctl -u my_unit.service But that only prints current logs without following them. I know I ...
jirislav's user avatar
  • 573
0 votes
1 answer
66 views

Is ftp connections and actions are logged in REDHAT 7?

I am using a REDHAT 7 server through a VPN connection (with some other users). I want to know if FTP connections and operations are logged somewhere. I tried to look around /var/log but nothing seemed ...
tekamed's user avatar
2 votes
0 answers
563 views

MacOS - How to change syslogd's log level for a specific process/program?

I am new to MacOS and I would like to get a better of view of what's going on with a system process when my computer is starting up. I can see in the log that a process is changing settings, but the ...
Cathy A. Brink's user avatar
1 vote
0 answers
914 views

'su root' succeeded for root on /dev/??? - SunOS logging

I have a log like this in /var/log/authlog : <date> <server> su: [ID 366847 auth.notice] 'su root' succeeded for root on /dev/??? and in /var/adm/sulog SU 12/12 11:13 + ??? root-root ...
Kiks777's user avatar
  • 11
0 votes
3 answers
4k views

search in log from last hour

I need bash script to search in the log words Failed and failure. But only from last hour cut -c 5- /var/log/mail.log | awk '($0 >= from)' from="$(LC_TIME=C date +'%_d %H:%M:%S' -d -1hour)" |grep -...
myhell's user avatar
  • 1
2 votes
1 answer
12k views

How to disable syslog messaging to /var/log/syslog

I'm working on a centralized logging solution using the ELK stack and Kafka. I'm running Ubuntu Xenial on all the machines, and I'm using Rsyslog with omkafka to write all log messages to a kafka ...
John Blackberry's user avatar
1 vote
1 answer
1k views

Is there a way to send logs to a remote host in real time?

I've been experimenting with high-interaction honeypots lately. Unfortunately if an adversary achieves root access they could easily wipe the logfiles on a system, defeating one of the purposes of a ...
Steve Mucci's user avatar
1 vote
2 answers
304 views

Filter lines if number of string occurrence found?

Need to filter and show log lines, if line contains exactly 2 commas, and does not contains a specific string. Which linux command need I use, awk, grep, what is the expression? For second condition ...
János's user avatar
  • 271
3 votes
1 answer
2k views

How to enable systemd's journal audit transport?

I have been studying logging on Linux but I have come to a road-block that's got me stuck for the past few days. My goal is to forward logs from two raspberry pi 3's running OpenSUSE Tumbleweed (...
Edge-Case's user avatar
5 votes
0 answers
6k views

How do I get reasonable server-side NFS log output?

I was experiencing some problems with nfs-kernel-server on Debian stretch which I could solve by luck. Still, I learned that the log output was not of much help of me. I would like to change that to ...
Multisync's user avatar
  • 268
1 vote
0 answers
152 views

centos7 what is the best value of audit.rules

I am now suffered with audit : backlog limit exceeded. I found some articles with similar situation and they said adjust audit log count with audit.rules. Here is my audit.rules ## This file is ...
Juneyoung Oh's user avatar
4 votes
1 answer
2k views

How to send log entries to a remote server running journald (systemd)

I have an iot module running a firmware that has the capability of sending the logs to a remote syslog host. I've already configured it to send the entries to an Ubuntu Server running rsyslog. I'd ...
Dario's user avatar
  • 143
1 vote
0 answers
28 views

Identify event that stalled server with GPU-applications temporarily

I'm running 4 intensive applications (training of machine learning models on GPUs) that regularly prints information about how fast they're running on a Linux 14.04 machine. Strangely enough, the ...
pir's user avatar
  • 301
0 votes
1 answer
7k views

rsyslogd: how can you use $ModLoad imfile more than once?

I am testing out Loggly.com, which uses rsyslogd to collect log entries. Loggly provides scripts that generate config files. Each config file starts with $ModLoad imfile, however this seems to only ...
Craig Wright's user avatar
1 vote
0 answers
506 views

Check to see if server is up

Create dir logs (for outputted logs) Create a script IsTheServerUp.bash Write a script to check if the server is up Log(echo) the outcome to the file Use curl command to check the server Use ...
CrazyGal's user avatar
2 votes
1 answer
415 views

Break and restart Linux command when specific text appears

To simplify the situation as much as possible, let's say I'm tailing a log file that gets rotated out when an application shutdown occurs. Since the file changes, the tail stops. In order to continue ...
mVChr's user avatar
  • 405
0 votes
1 answer
148 views

Occassional massive firewall log files on SuSE

Occasionally, over a short period of seconds, my SuSE Enterprise 10 /var/log/firewall log file fills with identical entries except for the id. Here's an excerpt: Jan 15 11:21:13 IKCSWeb kernel: SFW2-...
Rick Jolly's user avatar
1 vote
1 answer
3k views

How to make my Window system a Syslog server

I have my D-link router which can forward its logs to a syslog server. Now, I do not have any syslog server. Hence, I want to make my Windows machine a syslog server to get those logs from the D-link ...
Umang's user avatar
  • 69
1 vote
0 answers
345 views

How can I get exact same log file name in Rsyslog v-8

Previously I was using Rsyslog v-7.14 and having the template: $template UDP-Logging, "/var/log/RemoteLogs/%HOSTNAME%/UDP-%PROGRAME%-%$now%.log" if $fromhost-ip ! '127.0.0.1' then -?UDP-Logging &...
Amarjeet Sharma's user avatar
7 votes
3 answers
15k views

What does "Still Running" mean (Linux)?

$ last -x reboot reboot system boot 4.4.0-46-generic Mon Nov 14 12:15 still running What does the "still running" mean at the end of the log entry? Did the server reboot? Is it going try later? Is ...
user2966456's user avatar
-1 votes
1 answer
561 views

how to find a particular log from a server for one particular time and zip logs for only that time

I have got a command for the above question. Could anyone please explain me the below command? DATE=`date +%m%d%Y-%H%M%S` ; for i in `ls -lt *.log* | grep "Oct 11" | grep -E '12:|13:|14:' | awk '{...
Smitha's user avatar
  • 1
6 votes
2 answers
10k views

How to get a clue why my Linux computer is freezing

tl;dr My laptop computer running Linux is freezing randomly. What system tools can help to figure out what the problem is? DISCLAIMER: I hope my question is not considered as a duplicate since ...
mrkskwsnck's user avatar
0 votes
1 answer
627 views

Create CSV and Statistic Graphic from own Log File

i am just not that good, to get it work... i wrote a little script that runs a speedtest every 15 minutes, and logs the output in daily log files: #!/bin/bash DATE=$(date +%d.%m.%Y_%H:%M) DAY=$(...
René's user avatar
  • 13
-1 votes
1 answer
89 views

Linux RedHat - Logging await

How can I create an await log for the devices /dev/emcpower*1. The log should be in the pattern of: Aug 23 10:00:11 /dev/emcpowera1 2.96 Aug 23 10:00:11 /dev/emcpowerb1 2.91 Aug 23 10:00:13 /dev/...
Oz Bar-Shalom's user avatar
1 vote
0 answers
534 views

Problems with the tomcat access-logs

I need your help. I want to log the access on my Apache Tomcat webserver on SLES 12. It is running and logging normally. But when I visit the site, tomcat is writing 8 lines into the ...
jns's user avatar
  • 11
0 votes
1 answer
804 views

Extract text from journalctl logging facility

I have a system which I can access directly with the keyboard but not by ssh (which is my problem, and which arises the question; a RasPi 3 with OSMC 2016.05-1, which is Debian-based, version: 8.5). I ...
Tobias's user avatar
  • 315
1 vote
3 answers
3k views

Rsyslogd Log entry about attack created by unknown application

I have a server running for testing purposes which lately caught some strange log entries in /var/log/syslog, /var/log/user.log and /var/log/messages. auth.log does not show anything suspicious. No (...
user608231's user avatar
1 vote
0 answers
47 views

New Trisquel installation always at 100% CPU, log files grow very fast, graphical glitches, etc

About a week ago, I installed Trisquel on a rather old (2010-ish) computer, and ever since then there has been an issue which I had never found a solution for, but hesitated from asking for support ...
jdoetrisquel's user avatar
0 votes
1 answer
63 views

Python logging output limited to ~65 lines

I am working on a simple python script on CentOS 7. There is an error, but I am trying to figure it out using the log. I have a logging class that has the following logging levels: Error Warn Degub ...
The Drummer from Kubuntu's user avatar
0 votes
1 answer
1k views

how to see the output of a cron/at jobs while it is still running?

The output of a cron or atq job is automatically send by email to the user, when the job is finished. However I am running a time consuming script, and I would like to check that it is running ...
user13003's user avatar
  • 151
62 votes
6 answers
10k views

Alternative for "tail -f" that follows filename

I have some logs being generated using a timed rotating file logger. This logs to a file called tool.log, and at midnight, moves this to tool.log.<date> and starts a new tool.log. I have a tail ...
Hugh's user avatar
  • 1,211
2 votes
1 answer
2k views

Recording a bash session

For auditing and documentation purposes, I'd like to find a command such that everything that happens in a given bash session, is written to a file. I.e., I'd like to end up with a file that shows ...
marc's user avatar
  • 163
1 vote
2 answers
1k views

How to log all commands on a Linux machine?

Good morning, My collegues have created a script that executes compilation commands on UNIX and Linux based machines. In order to execute that script, Eclipse needs to be installed on that machine. ...
Dominique's user avatar
  • 2,283
0 votes
1 answer
903 views

Monitoring Linux writes to Compact Flash

I am working on a project that uses a SanDisk compact flash to host a linux operating system (ext2 file system and no swap). The system uses a separate IDE for logging and other file i/o functions. ...
T Vernon's user avatar
1 vote
2 answers
320 views

Watching logs with less +F freezes after a while

less +F is a great command for watching logs, but it has very annoying issue. After a while it stops updating log file and requires restart. Is there any way to make it follow file forever?
Marcin Szymczak's user avatar
1 vote
0 answers
132 views

how to get this layout with multitail

I have a silly one for you I know how to do this with multitail (multitail -s 2 -sn 1,2 A.log B.log C.log): +-----------------------+------------+ | | | | ...
guessimtoolate's user avatar

15 30 50 per page