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).

1
vote
0answers
15 views

logging for proxycommand

I need to logging users that connected throw bastion host using proxycommand, I have used next command: $ ssh -i ~/.ssh/key.pem user@ip -o "proxycommand ssh -W %h:%p user_bastio@bastion" In ...
1
vote
0answers
27 views

stderr stdout to log with date and time also show output to tty but without date and time

I am running some commands in a function. I would like to take logs of it by adding date and time for every command output of that function. However, in the terminal when executed, I want to show only ...
0
votes
1answer
13 views

Connection closed log lines in auth.log on Debian machines

My auth.log on my Debian machines was full of the following messages: CRON[1736]: pam_unix(cron:session): session opened for user root by (uid=0) sshd[1742]: Connection closed by ::1 port 38518 [...
2
votes
0answers
20 views

extract last 5 mins of information from the log file

system date format: Thu Jun 13 12:55:18 EDT 2019 My log format: 193.118.26.141 - - [01/May/2019:00:08:49 -0400] "GET / HTTP/1.1" 200 27 can someone please help me, how to get last 5 minutes of ...
0
votes
0answers
30 views

Comparing Timestamps

My users sometimes get alerts with a timestamp, (from another system, via email) but no hostname. I want to give them a function that can compare timestamps in my system that's designed like this: /...
1
vote
1answer
15 views

how to get packets log which are dropped by rp_filter=1

I do need a log of packets which are dropped by rp_filter ... how to do this logging ? which logs how to enable.
0
votes
0answers
17 views

Analyzing iptables logs to map network traffic and create firewall rules / access lists [closed]

Primary task: Setup of a segmented network with several security zones, allowing only specific protocols to communicate across zones. Objective: Collect and analyze iptables logs (or similar) ...
0
votes
1answer
31 views

ACPI error message AE_NOT_FOUND. Why is this happening now? It did not happen previously

I have used Linux on my PC for a long time. Some time recently, there is a new kernel error message on the text console. It also appears as a message in red in journalctl -p err. It did not appear ...
1
vote
2answers
44 views

How can I find the latest log for multiple jobs in AIX and delete the latest one

I am new to unix. I am trying to find the latest log of multiple jobs and delete the latest one. Can I write a shell script for it? I have tried with basic commands, but there it is selecting a ...
0
votes
0answers
24 views

run script continuously and check for error

I have written below script and it reads the file and when ever there is any 400* or 500* word it will give me error message, and now I want to add two more functionality to my script. I added the ...
1
vote
0answers
25 views

Recover accidentally flushed logs file

I have an Apache Tomcat running on CentOS7 server which had a file catalina.out of around 157MB in size. I was trying to download that file on my local system so I ran the tar -czf command but I ...
1
vote
2answers
62 views

Grep Syslog firewall logs

I have a file which contains firewall log like this: Feb 3 0:18:51 17.1.1.1 id=firewall sn=qasasdasd "time=""2018-02-03" 22:47:55 "UTC""" fw=111....
0
votes
0answers
11 views

Can I redirect logs from journald inside container to docker logs?

I have a container using systemd inside it. The command into the container is /usr/sbin/init. This is a requirement so I cannot change that. I also have a custom service running inside that container ...
0
votes
0answers
17 views

Centralized application logging that combines matching log lines to a single output [migrated]

We have a solution where we have multiple data centers and per data center we have multiple servers with the same application. The application is handling stateless traffic and produces a lot of ...
0
votes
0answers
11 views

USB disconnect and new USB device using xhci_hcd

/var/log/messages kernel: usb 3-7.3:USB disconnect, device number 69 kernel: usb 3-7.3:new low-speed USB device number 70 using xhci_hcd kernel: usb 3-7.3:new USB device found, idVendor=0461, ...
-1
votes
0answers
20 views

Oracle db 12c on docker. what could go wrong?

I'm trying to get Oracle DB 12c to run as a docker container so I'm following this blog's guide. I can't get passed step 7. This is the error I'm getting following this command: docker run --name ...
1
vote
1answer
27 views

screen logging - How to ommit interactive shell control characters and prompt?

One of my first questions. Please comment if further explanation or information is required or if the question is not like it's supposed to be here I'm using screen to automatically start servers (...
1
vote
1answer
19 views

Writing logs for openvpn in Ubuntu18

I've installed openvpn on Ubuntu18, and it works. I'd like to have a log containing only the times when users connect and disconnect. Found a hint how to do it at [https://github.com/furlongm/openvpn-...
0
votes
1answer
7 views

SMB Not Able to Use Date Command Substitution

smbclient //10.10.101.29/it -W WORKGROUP -U user --password pass -c 'put ./file_$(date +%Y_%m_%d).file ./folder/file_$(date +%Y_%m_%d).file' The above does not work & gives me an error stating: ....
0
votes
0answers
15 views

/var/log/warn and messages get written full with io/hpmud/musb.c 997: invalid bulk out endpoint [SLES11]

A couple of month ago I installed a HP LaserJet P3015 and some days ago even tho the printer worked it flooded my /var/log/warn and /var/log/messages files with the same message over and over again ...
0
votes
1answer
36 views

Question about /var/log files

I'm looking at the files under /var/log on CentOS 7... And many of the files have dates included in their names (i.e. secure-20190512)... but the date in their names don't correspond to either the ...
0
votes
2answers
58 views

Exit status of last command using PROMPT_COMMAND

I want to save the exit status of the last ran command (in a file, in a variable, it doesn't really matter), but this must be done automatically in an interactive shell, manually running something ...
0
votes
0answers
21 views

Is there a tool that feeds journalctl log updates to the program of your choice?

I have a log processing tool that takes lines in stdin and does some sort of processing that I need. Currently my application does log rotation so that it archives log file according to certain ...
0
votes
1answer
101 views

Advantage of elasticsearch over grep when trying to search keyword in logs files [closed]

I know elasticsearch is good for full text search but when it comes to analyze logs, say nginx logs what is the advantage of using it over grep (with tail, awk, etc.) ? Quite of often I dig through ...
2
votes
2answers
39 views

Automatic rmmod / modprobe based on dmesg parsing

I am using a MacBooPro10,1 Debian stable (default install with rsyslogd) system for which the trackpad eventually fails (pointer stop working) from time to time as can be seen : $ dmesg [...] [...
0
votes
1answer
22 views

How to operate on a directory with different owner from a script?

Few days ago i have installed elasticsearch, For diagnosing some problems on my elasticsearch setup, i have checked the logs files located in /var/log/elasticsearch and tailed them but apparently the ...
0
votes
0answers
69 views

Monitor SSH attempts in Windows Subsystem Linux

I am trying to look at failed SSH attempts, which I could do on a regular ubuntu machine by looking at /var/log/auth.log. I've taken a look at Debian - auth.log missing from /var/log and the WSL has ...
3
votes
1answer
72 views

Logging Shell Activity

Is there a way to produce a custom activity log in my BASH shell? It would save, in each row, the last command, the time when it was run, and the working directory from which it was run. Note: It ...
0
votes
0answers
13 views

What does journal hostname field refer to?

I have a question about hostname field that journalctl displays. From journalctl documentation I know that _hostname= is displaying the name of the originating host. So in that case this log: march ...
1
vote
0answers
63 views

How to monitor system with `snort` and send emails about `alerts`

PROBLEM: I have been configuring snort on my systems and would like to get emails from the systems if there are any alerts. What I have tried is swatch but I can't find much documentation on it, can ...
0
votes
1answer
28 views

`systemctl status atop` shows it has failed, but there is no error message

I installed atop, and then immediately upgraded from Fedora 29 to Fedora 30. Now atop failed to start during boot. But there is no error message. It only shows that atop exited with code 7. Why ...
0
votes
0answers
72 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 ...
1
vote
0answers
29 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
44 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
27 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
26 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
198 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 ...
1
vote
2answers
59 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 -...
0
votes
0answers
21 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
23 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
84 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
43 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
34 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
39 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
37 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
227 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
17 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
42 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
47 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. ...