Stack Exchange Network

Stack Exchange network consists of 175 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

How do I forward particular logs under a directory using rsyslog?

Trying to froward following logs from /home/ddlog/ms/logs/execution_logs/abc-xyz-ms* to VMware vRealize Log Insight using rsyslog.For some reason that does not seem to be working. I have tried using ...
-1
votes
0answers
6 views

Logrotate debug mode errors

I have the following logrotate script /path/to/folder { daily rotate 30 notifempty sharedscripts copytruncate compress dateext preremove if file --mime-type "$1" | grep ...
0
votes
0answers
22 views

ignore an ip in secure log

I have a server and a client, in which the client used to pass a data through ssh in the rate of 600+ per minute. which means 600+ ssh connections where established and closed in a minute. Because ...
1
vote
0answers
21 views

How to see laptop camera logs on Ubuntu

I would like to know if it is possible to discover when my laptop camera was used over the past 7 days. eg. Is there a log for that? I am running on a Ubuntu 18 machine.
0
votes
1answer
16 views

Have logwatch send reports only once a week

I would like to lessen the noise from logwatch reports sent to my email on three systems. Is it possible by to configure logwatch to send only some days in the week, or once a week? More relevant ...
1
vote
0answers
21 views

Docker Debian, getting some specific syslog in the docker container log

I have been installing SSH in the Debian Docker. Since I wanted to have some extra log, I also installed the Rsyslog as described in this question. Result was that some extra logs are created e.g. ...
1
vote
0answers
20 views

Debug log for WiFi processing

I am trying to integrate WPA2 into open network in AP side, and I managed through quite good so far, I am now able to encrypt and decrypt live traffic. However, stations are ignoring my messages, ...
3
votes
4answers
156 views

How to grep and cut numbers from a file and sum them

I have a log file. For every line with a specific number, I want to sum the last number of those lines. To grep and cut is no problem but I don't know how to sum the numbers. I tried some solutions ...
0
votes
0answers
36 views

Netconsole kernel module fails to load at boot time from the kernel command line [on hold]

I'm using RHEL 8 beta I follow the instructions on netconsole module I put netconsole=+5555@10.0.0.1/eth0,5555@10.0.0.2/ to the kernel command line. On ubuntu 18.04 it works but on RHEL or CentOS ...
-2
votes
0answers
43 views

How to solve “timed out and dependency failure” while booting my Kali linux Rolling?

I have been using kali linux for 2 years .Today when I boot as usual Kali Linux shows "timed out and dependency failed" and stops booting above pic shows fstab file This above pic i analyze with ...
1
vote
2answers
54 views

Combining two outputs using AWK

I have a bash command (on macOS High Sierra) as: sudo cat /private/var/log/system.log*| awk 'BEGIN {print "\n"} {print "Month\tDay\tTime\t\tSystemMessage"} /SHUTDOWN_TIME/{print $1,$2,$3,$8}'|sort -...
-2
votes
1answer
53 views

Can I combine the tail and gzip commands inside a function? [closed]

I'm currently learning UNIX commands as part of my internship. Is there a way to combine these two commands-> (tailing log files then zips it using gzip)? My script is posted below: #!/bin/sh # ...
0
votes
0answers
20 views

Monitor Apache Selectively

I am working to parse apache logs in Common Format in realtime so that I monitor them while I work. "tail -F /var/log/apache2/access.log" works but provides more than I need. "awk '{print $1 " " $2 " "...
0
votes
1answer
15 views

Viewing the system.log.0.gz under /private/var/log in macOS

Am trying to view the contents of a system log -system.log.0 ,system.log.2 using macOS terminal .The logs are located under /private/var/log (macOS) I have tried zcat,gunzip etc.but with no fruitful ...
1
vote
2answers
71 views

Get logs for last 30 minutes

I want to extract the logs between the current timestamp and 30 minutes before. I developed the below script but it's not working properly it shows only timestamp lines whereas I have to get ...
0
votes
0answers
28 views

Fedora server reboot

I'm having an issue on a fedora server running on my laptop. I would like to get to the root of why Fedora decides to reboot automatically after a certain error: Apr 10 06:14:33 Leviathan.mendelev....
0
votes
1answer
14 views

PackageKit logs a message about “only_trusted:0”

I ran pkcon update force. I noticed PackageKit is logging about only_trusted:0. That is, an operation where the only_trusted option is disabled. Even though I did not pass --allow-untrusted to ...
0
votes
1answer
34 views

awk filtering one column log file

I'm trying to use the following command to extract a time period forthe current day date and grep for the specific message as you can see below: awk -v date="$(date +%Y%m%d')" '$1="date" && $...
0
votes
1answer
24 views

A log of when the machine and/or monitor was turned on?

Does GNU/Linux keep a log of when the machine and/or monitor was turned on? I wish to limit my screen time by telling the machine to automatically hibernate 90 minutes after the last startup or awake....
0
votes
1answer
26 views

Log ethernet in lan [closed]

It is planned to install a clean ubuntu server 18.04 on a machine with two network cards. One card will receive internet from the provider. The second is the local network through which users will ...
2
votes
3answers
136 views

Use sed to replace IP address with hostname in log output

I am trying to replace an IP address in a dnsmasq logfile with its hostname. The logfile is being 'watched' with the command 'tail -f /var/log/dnsmasq.log' on the console and I want to pipe the output ...
1
vote
0answers
15 views

systemd looking for update-rc.d when I try to enable redis service in Ubuntu 14.04

I was trying to install redis from source in Ubuntu 14.04 and Ubuntu 16.04. I did followed everything exactly from this tutorial. Only difference was that my logfile path was /redis/logs/redis-server....
0
votes
1answer
36 views

My Kali upgrade fails - location of the log to find out the problem

Where is the log that tells me where the upgrade got to before it failed. My current info: No LSB modules are available. Distributor ID: Kali Description: Kali GNU/Linux Rolling Release: 2019....
0
votes
1answer
25 views

Logrotate is not compressing

I need to compress the files in var/log/remots/*/* with the following logrotate rule /var/log/remots/*/* { rotate 178 daily maxage 178 compress } located in /etc/logrotate.d/remots. ...
1
vote
0answers
17 views

journald flooded by kernel messages

My journald log was at some point filled up with kernel messages like this. Mar 12 05:03:53 workstation.mydomain kernel: FAT-fs (sdd1): FAT read failed (blocknr 1785) Each followed by a message ...
-2
votes
1answer
17 views

I enabled iptables logging from the command line. How do I undo this logging configuration?

I ran sudo iptables -A INPUT -p udp -j LOG --log-prefix "udp:" How do I make it stop?
0
votes
0answers
28 views

how to update the log message about failure of service

I configured the service - calc_mem.service as the following Restart=on-failure RestartSec=5 StartLimitInterval=400 StartLimitBurst=3 the configuration above should do the following the service ...
1
vote
1answer
35 views

Can't find SSHD/systemd socket-activated logs

I'm trying to view the logs for my SSH server (CentOS 7) but cannot seem to find them. It's configured to use the systemd socket activation. I normally expect to find them with journalctl -b -u sshd....
1
vote
1answer
34 views

bash + write standard output and error to both logs

in my bash script I use the following approach in order to write every thing from standard output and standard error to log.txt export LOG=/tmp/installation/log.txt exec > $LOG 2>&1 so ...
1
vote
1answer
34 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
68 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
33 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....
10
votes
2answers
909 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
15 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
42 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
42 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
45 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
29 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
70 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
40 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
39 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
73 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
28 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
55 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
32 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
37 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
77 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
73 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
44 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
110 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,"%...