Skip to main content
15 votes
Accepted

Convenient way to get a shell with a systemd unit file restrictions?

systemd v258 added a new unit-shell verb to the systemd-analyze command that does exactly this: systemd-analyze unit-shell SERVICE [command...] The given command runs on the namespace of the ...
Max Chernoff's user avatar
13 votes

Kernel stack trace to source code lines

Install kernel-debuginfo Download decode_stacktrace.sh which is in the kernel source tree. Make stack dump output useful again. # ./decode_stacktrace.sh /usr/lib/debug/lib/modules/`uname -r`/...
wenjianhn's user avatar
  • 281
11 votes

How to see stdout of ansible commands?

If you really want to watch the output in realtime, there is a hacky way around it, at least for the ansible shell module. In whatever shell script wraps your call to ansible, touch and tail a log ...
cobbzilla's user avatar
  • 301
10 votes
Accepted

Ubuntu Server with systemd - how to get a backtrace or coredump?

Take for example a relatively simple service, the chrony NTP daemon. Install debug symbols with the dbgsym packages. Unfortunately, the ddebs repo is not in sources files by default. Also there is ...
John Mahowald's user avatar
7 votes

Convenient way to get a shell with a systemd unit file restrictions?

Use systemd-run with the properties copied out of the .service file into -p options. This will actually call into systemd to create a real in-memory .service unit, but with the additional possibility ...
grawity's user avatar
  • 18.8k
5 votes
Accepted

Monitoring HTTP 5xx errors in an Azure App Service

To get the most detail on your errors you want to hook up your web app to App Insights. This will collect all this data and give you a (relatively) easy way to delve into them. App Insights has a free ...
Sam Cogan's user avatar
  • 39.1k
5 votes

Kernel stack trace to source code lines

With gdb, you can also use this command to find the line number quickly: (gdb) list *(some_function+0x12c)
accessory's user avatar
  • 161
5 votes
Accepted

What does `Accept-Encoding: gzip,deflate` mean?

It means the client can accept a response which has been compressed using the DEFLATE algorithm. https://en.wikipedia.org/wiki/Deflate This algorithm is also used in gzip compression format. It does ...
David Pierson's user avatar
4 votes
Accepted

How to debug linux startup hang

Since you can log in to the system, you can use systemctl to find any units that are hanging or failed to start correctly. For example: systemctl list-units --state activating,reloading,failed What ...
Michael Hampton's user avatar
4 votes
Accepted

nginx. How to log ssl errors without blowing up the server logs

All the SSL handshake errors you mention are logged by nginx at an info level, so you don't need to enable debugging. You don't mention which distribution you are using, but most systems nowadays ...
Piotr P. Karwasz's user avatar
3 votes

nginx. How to log ssl errors without blowing up the server logs

A: enable "debug" create pipe instead of logfile (ensure it won't be hurt by logrotation) create listener in background (cat awk, grep, sed, whatever, etc) restart nginx B: error_log syslog:server=...
GioMac's user avatar
  • 4,747
3 votes
Accepted

/etc/login.defs settings not taken into account: password aging

The man page is pretty clear about this: PASS_MAX_DAYS, PASS_MIN_DAYS and PASS_WARN_AGE are only used at the time of account creation. Any changes to these settings won't affect ...
Michael Hampton's user avatar
3 votes

Debugging Prometheus OOMkilled despite 6Gi limits

Here are most likely reasons of prometheus eating memory: Overwhelming number of timeseries. Considering background this is most plausable. In prometheus datapoints are taking not much memory ...
Vladimir's user avatar
  • 656
3 votes

Why is MemAvailable a lot less than MemFree+Buffers+Cached?

Are there any tools I can run to further investigate why this happens? The discrepancy could be because you are using the wrong calculation. The answer you linked to does not highlight this, but look ...
sourcejedi's user avatar
  • 1,180
3 votes

How to see stdout of ansible commands?

I've found that just killing a stuck process on the remote via ssh gives back the stdout. I find thats shorter than writing workarounds that won't be used in the final playbook anyways: kill -9 PID
dza's user avatar
  • 172
3 votes

How can I find out what is causing interrupts on Windows?

Two great tools are LatencyMon and Thesycon’s DPC Latency Checker (discontinued in 2020).
ron's user avatar
  • 213
2 votes

ext4 listing of files very slow in one specific directory that contained lots of files before

From man e2fsck: -D Optimize directories in filesystem. This option causes e2fsck to try to optimize all directories, either by reindexing them if the filesystem supports directory indexing, ...
moonwalker's user avatar
2 votes

How to see stdout of ansible commands?

Another way to get stdout of a command is to add more verbosity with -vvv. You don't have to write debug tasks, and it gives you good and viewable (JSON on multiple lines) output for everything. The ...
tholeb's user avatar
  • 69
2 votes

How do I Identify an anonymous process that's changing a system setting?

I think you want to take a look at auditd. The following document is from Redhat, but is also applicable to CentOS 7: How to monitor permission, ownership or any other change to a particular ...
guzzijason's user avatar
  • 1,428
2 votes

Why is MemAvailable a lot less than MemFree+Buffers+Cached?

As you saw in the article you references, the whole set of calculations around MemAvailable is built around calculating how much memory is free to use without causing any swapping. You can see in the ...
Kurt Fitzner's user avatar
2 votes

jcmd works in console but fails in script

Try using & .This will make the script to run in the background. And it will have access. -XX:OnOutOfMemoryError='sh /opt/alfresco/scripts/dumpNrestart.sh &'
srikanth vadapalli's user avatar
1 vote

How to get line number of error that .htaccess apache2 is reporting in /var/logs/error.log

Unfortunately, as far as I can tell, there is no way to get the "line number" on which the syntax error occurs to be reported in the Apache error log. Ordinarily, you can increase the ...
MrWhite's user avatar
  • 13.6k
1 vote

tracking down a bash process for a df command

Mystery solved. It is indeed MobaXterm, bottom left, there is a Remote Monitoring option:
RobbieTheK's user avatar
1 vote

How to log a single-board computer events?

What's the make and model of the single board computer? Does it have a serial port? If so then you might be able to get POST messages over serial. What OS are you running? With most flavors of Linux ...
Chris B's user avatar
1 vote

How to verbose log dhcp messages with options values

Use dhcpdump -i eth0. This show nicely the content for the dhcp packets.
MrFAI's user avatar
  • 36
1 vote
Accepted

Why is MemAvailable a lot less than MemFree+Buffers+Cached?

With modern Linux kernels the Cached value contains disk cache and all shared memory. As only disk cache can be dropped, all of Cached cannot be considered as available memory. I asked about this on ...
Mikko Rantalainen's user avatar
1 vote

How do I Identify an anonymous process that's changing a system setting?

/etc/localtime determines the default timezone of the system. It is not necessary to change this file when adjusting the system time, unless you're also changing the system default timezone at the ...
telcoM's user avatar
  • 4,896
1 vote

Why does my VM become slower during CPU-heavy tasks after some days of runtime?

At least in this particular case it had something to do with the amount of memory assigned to the VM. The problem occurred after some hours or days of runtime reliably using a VM with 48 GiB of RAM ...
Thorsten Schöning's user avatar
1 vote

NTP rejecting upstream due to "peer_dist"

If ntpd is reporting the peer_dist code for the upstream peer, that means that between the root dispersion reported by the peer and the dispersion measured in the peer association, the 1.5-second ...
Paul Gear's user avatar
  • 4,726
1 vote
Accepted

How to check why a write failed?

If the write failure was related to a disk I/O error, and so to a failing disk, then you would very likely find error messages from the kernel in the dmesg output. But if there are no such symptoms, ...
telcoM's user avatar
  • 4,896

Only top scored, non community-wiki answers of a minimum length are eligible