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
1
vote
1answer
43 views

Can be the journal path on a filesystem other than /?

I would like to store the default journal directory /var/log/journal/ on a mounted device, but I am not sure if I can do it due to the fact that journal is an important service which may already run ...
0
votes
2answers
71 views

shell - extracting date & time from logs

I have web server log files that look like this: 2001:67c:1220:80c:d4:985a:df2c:d717 - - [22/Feb/2019:07:49:01 +0100] "GET / HTTP/1.1" 200 58266 "-" "curl/7.61.1" 2001:67c:1220:80c:d4:985a:df2c:d717 -...
0
votes
1answer
243 views

How to keep kern.log out of syslog

I'm working on Ubuntu 16.04.3 and I found that I could get the log of kernel from two places: /var/log/kern.log and /var/log/syslog. /var/log/syslog contains other logs but I could find /var/log/kern....
11
votes
2answers
972 views

Why does cron require MTA for logging?

Why does cron require MTA for logging? Is there any particular advantage to this? Why can't it create a log file like most other utilities?
2
votes
0answers
22 views

systemctl echos prints interference from other unit

I am working on a service which runs just fine. My poblem (or rather a mild annoyance) is that when I run systemctl status foo.service or journalctl -u foo.service I will occasionally see error ...
1
vote
1answer
252 views

Getting systemd service logs faster from my service

I'm having a systemd service defined as follows, that works fine: [Unit] Description=my service After=network.target [Service] User=myuser Group=mygroup WorkingDirectory=/home/myuser/myapp ...
0
votes
1answer
176 views

how to use logger to write info to log

I want to use the logger command in order to write logs to /var/log/server.log NOTE: These examples use the FreeBSD version of logger. Your system may have different options, so read your local ...
1
vote
0answers
53 views

why messages logs are zero

we have linux machine: more /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo) all message files under /var/log are ZERO how it could be ? what is wrong here ? -rw-------. 1 ...
0
votes
1answer
34 views

logger + how to change the logger title instead user root

I want to use the log - /var/log/message for my logs my application name is - whatsapp_man for example I send the following warning to the log [root@worker01 ~]# logger "please noitce you are before ...
0
votes
1answer
94 views

Why is there Russian traffic in my web server's log files?

My family's business runs a website with GoDaddy for promotional purposes. I checked the logs the other day and found some really strange traffic that I don't exactly understand: 188.234.248.201 - - [...
0
votes
2answers
50 views

Bash Shell takes variable amount of time to load

I use bash on Ubuntu 18.04. I have added a lot of functions and a lot of scripts are sourced in my bashrc. I am able to time the total time it takes to load my terminal, sometimes it takes 0.9 seconds ...
0
votes
0answers
83 views

How do I save the putty screen with python?

i write sth on putty screen with python. But i can not save this screen. i have opened putty (logging >> log file name). Then i start the python. after python finnish. then i can open this putty ...
0
votes
1answer
284 views

Socat. Bridge TCP - SERIAL PORT. With log

I'm trying to create a bridge between TCP server and a client connected thorough a serial port using socat. I emulate my TCP server with the following command socat tcp-listen:8888,reuseaddr - I ...
0
votes
0answers
31 views

Reusing the last N lines in terminal

I'm writing a Bash script that makes a series of build commands visiting each of subdirectories. It mainly prints the logs from the build command, but it occasionally prints logs by itself, like what ...
0
votes
1answer
284 views

How do you find out if a linux machine overheated before the previous boot and was shutdown in Debian?

Today I was working on a remote machine (the likes of which I'll likely never see), and it was hung, so I told the user to restart it. The machine came up again, and I ssh'd into it, but as soon as I ...
1
vote
1answer
70 views

Limit on continuously writing to a log file

I am using Debian running on a BeableBone Black with 4GB of internal flash storage. My program is continuously writing / appending to a log file that I created with >> every minute, all day ...
0
votes
1answer
41 views

What happens to the output of a service?

When I run a service from a terminal it shows many logs/errors/successes in output. But if I run it with same command options as a service (under systemd on Debian Linux) it does not show any terminal ...
1
vote
5answers
104 views

Stop program from writing to a deleted file

One of our systems has a growing log file (we will be addressing) but currently the application owner will delete the file with rm then wait for the next maintenance window to reboot. I find myself ...
0
votes
1answer
175 views

Log the files found with the linux find and sed command

I have a folder with txt, html, jpg and png files. Now I want to go over all textbased files (txt and html) and start a search and replace. I did the following and it is working fine: find ./ -...
0
votes
3answers
51 views

how to get the logs of integrated command of find and mv?

I used this command to my script to find specific files and to moved to different folder; however, I would need to generate a log of which file/s I have moved. find $1* -prune -name "*.$2" -mtime +$3 ...
1
vote
1answer
371 views

What is causing my rsyslog timezone offset and / or time to be incorrect?

I have a central logging server running rsyslog 7.x on RHEL 6 The logs are coming in with a UTC time but an EST offset for a device. Here are some relevant configs. $template TEMPLATE_NAME,"%...
0
votes
1answer
33 views

MESSAGE=anthony … USER=root <— Does this mean that the root user is the actual user but “anthony” will be displayed as being the user anyway?

I found this in /run/log/journal/... MESSAGE=anthony : TTY=pts/10 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/find / -name *systemctI* I'm wondering what this means? I'm suspicious of this process "...
0
votes
1answer
32 views

Any BI or log tools to import dumb file [closed]

Currently we do not have any log tools for filtering a huge dumb file. Is there any open source BI or log tool able to import a dumb file and do auto/selectable filtering? Current dumb file example: ...
0
votes
0answers
142 views

Logging Chrooted Users SFTP Activity

So I'm having the issue where I can't seem to log users SFTP activity. I can see when a new session was created by a specific user, but can't see where they've been or what they may have dropped ...
4
votes
3answers
1k views

Understanding sshd logs

I understand where to find the logs, but I am not always sure what they mean. And I can't exactly find a comprehensive guide on sshd logs explaining what they mean. I am particularly concerned with ...
0
votes
0answers
31 views

Packet capture with iptables/rsyslogd?

The usual way I know of capturing packets is with iptables/NFLOG/nflog-group and ulogd with libpcap.so built in. It's a simple matter to enable packet capture in the ulogd.conf file and all rules that ...
1
vote
1answer
25 views

Method to automatically email if a drive goes offline (or a USB port is restarted)

Is there a quick and easy method to send an email (I already have automatic emails coming from the server for other events - I just need to be able to send one for this specific event) if a USB port ...
1
vote
0answers
149 views

CentOS: Collecting and analysing logs using NXlog and OSSIM

Objective: Forward logs from all servers to OSSIM, correctly formatted and readable. Steps: Deploying one NXlog Collector/proxy node in each network zone - DONE Deploying one NXlog Collector/master ...
1
vote
2answers
249 views

Extracting specific lines from log file with grep and awk

I have a huge log file (20 millions of lines) telling me if some url status are responding "200 OK" or not. I'd like to extract all url with status "200 OK", plus the filename attached with it. ...
0
votes
0answers
13 views

How to use the 2nd monitor to only show textmode vt1 with critical log info?

I have one graphics card with 2 OUTPUT ports: VGA and HDMI and 2 led monitors. On the 1st monitor, the HDMI one, I use the graphical environment (Unity/KDE/Gnome etc). Using NVidiaSettings, I can ...
1
vote
0answers
27 views

Freeze Linux when log is full

Is it possible to configure a Linux server to stop all operations when it cannot create logs, similar to the security policy in Windows called "Audit: Shut down system immediately if unable to log ...
0
votes
0answers
34 views

xscreensaver - how to log successful logins

I would like to log successful login attempts from screensaver. Running xscreensaver with xscreensaver -verbose -log ... does give me something usable: input finished. pam_conversation (...) ==&...
0
votes
0answers
25 views

Command to append new logs content, generated in a directory to the end of a file

I've got an IDS which creates log files inside a directory. These logs all start the same ie, IDS_log_XXXXX. I have a perl script setup which would email me when these logs would contain certain ...
0
votes
2answers
58 views

do incorrect usernames get logged?

i was wondering if a GUI login attempt with a non existing username will be written to any log files? (im using mint with cinnamon and Kali with gnome3) I accidentally put my password in as username ...
0
votes
2answers
59 views

Add entry for a logfile

How can I add a logfile line to the following bash file? #!/bin/sh if ps x |grep -v grep |grep -c cccam_2.3.2 >/dev/null then echo "cccam... ok" else echo "cccam... restarting" /var/...
1
vote
2answers
75 views

How can a log print to display while shutdown, reboot or startup?

As we all know, when we reboot, shutdown or startup a system, some message will be printed on the screen, here is a capture: My system is Ubuntu 16.04, I know these log messages as above come from ...
0
votes
1answer
31 views

Centos6 - Log files copied from the server

Is there a way to log any files copied from the server to a PC on the network? It would be a specific directory on the server (Centos 6). I have tried searching for an answer to this but to no avail ...
2
votes
1answer
213 views

Redirect script output both to console and to log

Take a look on the following # more /tmp/myscript #!/bin/bash echo I AM echo BIG GUY echo AND ALSO SMART # bash /tmp/myscript | tee -a >/tmp/log why we not get the output from echo in the ...
0
votes
1answer
62 views

Script “7 days log tar and then remove the 7 days logs and exclude the tar file after next 7 days”

I am trying to create a script such that it could tar.gz all the previous log of per 7 days log and exclude the tar file in next run. Is the script ok or should I have to make a change find /home/...
0
votes
2answers
33 views

Occurence Count

184.13.80.102 - - [07/Jan/2019:00:33:10 -0500] "GET /?p=454 HTTP/1.1" 200 8822 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0" 184.13.80.102 - - [07/Jan/2019:20:16:...
1
vote
1answer
152 views

Apache 2.4 get request processing time in microseconds log

Trying to add the %D and %T format string to my Apache log to see time for request processing but apparently not able to. Here are the LogFormat directives in my httpd.conf [root@server01 admin_ad2]# ...
0
votes
1answer
72 views

How to writes the log on the screen during shutdown and startup (after grub)

As we know, when we startup the system (after grub) and when we shutdown the system, many logs will be printed on screen. I know that the kernel would write some logs of the kernel. But how about the ...
0
votes
0answers
25 views

Get output of server crash from server re-spawning script

I currently have Homebridge set up on my raspberry pi. When the pi boots, it starts a script which attempts to keep homebridge alive. I originally took the script from this answer which walks you ...
3
votes
2answers
424 views

Command: find and delete log files - deep explanation

find $LOG_PATH -type f -mtime +60 -print -exec rm {} \; Above command deletes log files, I did read the manual for each command but didn't understand it WELL. Can anyone explain this in a simple ...
0
votes
0answers
203 views

Why does fail2ban not trigger my custom filter?

fail2ban-regex verified that my filter matches Jan 14 07:39:41 myhost01 sshd[26433]: Connection closed by authenticating user root 127.0.0.1 port 56216 [preauth] 68 times inside auth.log, but fail2ban-...
0
votes
1answer
213 views

Can I tell from the system log, whether XFS was cleanly unmounted on the previous shutdown?

Is there an XFS equivalent of the fsck.ext4 message "recovering journal"? (See Does "recovering journal" prove an unclean shutdown/unmount? ). fsck.xfs is a no-op. So does the kernel log ...
0
votes
0answers
24 views

`screen` not creating log file when run inside tmux/byobu?

When we use screen command with -L option, it creates log files of the session with names like screelog.0, screenlog.1 and so on. These log files are created inside the directory in which the screen ...
1
vote
1answer
51 views

Stream text into a file while compressing it

I have an Arduino Nano connected to a Raspberry Pi which streams text data (the output of a GY-91 sensor) to a listener on the Raspberry Pi. P: 974.044 | T: 22.65 | AG: -0.17 -0.10 1.01 | GD: 1....
0
votes
0answers
87 views

rsyslog: send logs to different file by filtering syslogs

I have a CentOS based rsyslog server which have the below settings, where it's getting all the remote NATing events from multiple hosts. $template TmplcpFW, "/var/log/%HOSTNAME%.log" if ($hostname == ...
0
votes
2answers
94 views

how to delete files in folder with thousands of files [duplicate]

in the folder cd /var/log/hive I guess we have thundered of log files I say that because if I do under this folder ls -l then its stuck and only CNTRL C , will exit so I cant to vew all ...