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 ...
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`/...
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 ...
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 ...
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 ...
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 ...
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)
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 ...
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 ...
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 ...
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=...
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 ...
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 ...
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 ...
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
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).
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, ...
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 ...
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 ...
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 ...
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 &'
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 ...
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:
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 ...
1 vote
How to verbose log dhcp messages with options values
Use dhcpdump -i eth0. This show nicely the content for the dhcp packets.
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 ...
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 ...
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 ...
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 ...
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, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
debugging × 202linux × 26
apache-2.2 × 18
logging × 17
networking × 13
performance × 12
php × 10
windows × 9
troubleshooting × 9
ubuntu × 8
bash × 8
http × 8
nginx × 7
iis × 7
configuration × 6
kernel × 6
windows-server-2008 × 5
mysql × 5
apache-2.4 × 5
windows-server-2003 × 5
sql-server × 5
windows-7 × 4
ip × 4
cpu-usage × 4
.net × 4