Questions tagged [strace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
32 votes
3 answers
39k views

How to set strace output characters string width to be longer?

Strangely i can't find it any where but when i stdout the output of strace into afile like this: strace foo.exe | & tee foo.log the out put is to short, how can i make the width longer?
1 vote
1 answer
1k views

how to see the verbose output of a process that is running that writes to a file (shred)

I am running the shred command to securely wipe some storage. I would like to see its progress, but have lost the ssh terminal that was running the command. Is there a way that I can use to see the ...
0 votes
1 answer
432 views

memcached causes Apache processes to hang indefinitely

I have been tracking down the source of Apache processes hanging indefinitely. Unfortunately, I need to regularly reboot Apache as it eventually exhausts all slots. The Apache status page below shows ...
0 votes
1 answer
253 views

Dump client ssh key from server side

To investigate on some issue, I need to dump the full ssh key offered by the ssh client to the ssh server. Up to this point, I tried to put the parent of all sshd server (belongs to root) LogLevel to ...
0 votes
0 answers
981 views

WSL PING "system error"

I have a weird PING error in WSL2, Ubuntu 20.04 distribution. When I'm doing nslookup - all ok: root@i:~# nslookup google.com Server: 172.19.224.1 Address: 172.19.224.1#53 Non-...
0 votes
1 answer
1k views

Dovecot cannot read TLS certificate

On my CentOS 7 system I am trying to run dovecot with TLS required. For that, I created my private key and certificate in [root@homeserver /]# ls -lZ indernet/cert/homeserver.* -r--r--r--. root ...
1 vote
0 answers
424 views

read system call freeze

I have a VPS which sometimes suddenly got stuck. Recently I found ssh session will get stuck when I run ps aux. After run strace ps aux I got below. stat("/proc/1573", {st_mode=S_IFDIR|0555, ...
10 votes
5 answers
39k views

"yum clean" hangs - what to try next?

I run a number of CentOS servers. I was recently doing the occasional yum update but this failed on a handful of the servers. On most I have been able to move forward by doing: # yum clean all # rm -...
1 vote
0 answers
53 views

What's the best approach to find out in doing what a Linux OS process is stuck?

Oracle DBA here! No experience at all in troubleshooting Linux performance... I need to identify the bottleneck in an Oracle database running on Oracle Linux. The same procedure runs fine on other VMs,...
0 votes
1 answer
352 views

How to configure nginx better to reduce redundant system calls when APIs are called?

I have a Laravel application running in production, and there are a few APIs that used a lot. Something was creating a bottleneck and it used to stall our servers (3 with Load Balancer). After ...
14 votes
4 answers
20k views

Monitor all newly spawned processes on a Linux machine

Sometimes a process comes and goes faster than I can ps aux, I tried watch -d -n0.1 "ps aux | tail" but again, that's restricted to 1/10th of a second. What I really want is to run a command and ...
1 vote
2 answers
332 views

Simple command to display in terminal the network activity of a command? A better formatted strace?

I want to debug a program which makes a simple network connection. Is there any command which will print the network activity of a command, something that will show me (e.g. in a hexdump) what is ...
2 votes
2 answers
2k views

MySQL reading /etc/hosts.allow and /etc/hosts.deny

The error reporting of one of my services reported problems to connect to my MySQL server. This problems were not consistent, it just happened a few times to different servers. I started debugging ...
1 vote
2 answers
410 views

Record SSH commands sent to a Mac from Windows

I've got a bit of a puzzler - I am an administrator on both a Windows 10 and a Mac Catalina machine. The Windows machine is currently running software that has a known bug - SSH commands are sent to ...
0 votes
0 answers
587 views

High httpd CPU usage, server load, strace is stuck

I'm runnning Directadmin with apache2 and MariaDB server. But I'm having a hard time to understand why my server's CPU usage is so high. htop screenshot When I try to look what is happening with ...
2 votes
1 answer
2k views

Tracking down an elusive and slow anon_inode from lsof and Apache strace

Experiencing an intermittent issue with a LAMP application wherein Apache forks to its ServerLimit and grinds to a (near) halt. An strace on any httpd process shows numerous, slow epoll_wait calls. 1....
1 vote
1 answer
307 views

Trace httpd when using cgi

I have configured httpd (apache2.4.6) cgi to run /bin/bash scripts. I would like to trace httpd calls of /bin/bash and see the actual command that is run. So far I have tried to use strace -p but for ...
1 vote
3 answers
1k views

Mysql killing the CPU with gettimeofday

I have a problem with mysql killing the CPU on a Debian Squeeze 64. This is a development machine on a VPS so I stopped all the other services, including apache2. The mysql version is 5.1.49. This is ...
1 vote
1 answer
191 views

How to use strace to monitor files being saved on an smb share or being transferred over http

Can strace be used to trigger events or notify whenever a file is saved on an smb share or file is uploaded to a website over http/https?
2 votes
1 answer
1k views

Debugging slow ls on cifs mount strace makes it fast

I've got a server that has a cifs share (Azure storage files) mounted. Sometimes ls is returning slowly (20seconds). After debugging a bit I've so far found that: doing ls /data/some/symlink/...
0 votes
1 answer
514 views

Stack trace of mount command shows File not found error

When I run a program, I am getting a mount error: [root@host ~]# ip vrf exec wan1 /usr/sbin/ssh [email protected] Failed to mount cgroup2: No such file or directory I know my kernel supports cgroup2: [...
21 votes
6 answers
126k views

Find out what high CPU usage apache process is actually doing?

Currently having a few issues with our server where, intermittently, we seem to get apache processes which just run and run, taking up 100% CPU. When running top, we see the following: PID USER ...
0 votes
1 answer
47 views

Select waiting on what?

I have a python 2.7 app running on RHEL 6 that occasionally hangs. If I strace the app, I get this repeatedly: [pid 180442] select(0, NULL, NULL, NULL, {10, 0}) = 0 (Timeout) [pid 180442] select(0, ...
0 votes
3 answers
3k views

Troubleshooting SUDO Slowness with STRACE

I'm having trouble with sudo on some systems. It is taking anywhere from 15-30 seconds to complete a sudo command or to even login to the system. I ran an strace and can see where the delay is ...
4 votes
1 answer
2k views

What might be causing repeated mmap/munmap in strace results?

I have a (node.js) application which is occasionally causing 100% CPU usage. I've attached to the process with strace when it's been in this state - but I don't know what to make if the strace output....
2 votes
2 answers
1k views

Centos 6 vs Centos 7 file access performance [closed]

I'd like some assistance in trying to figure out what could explain Centos 7 being slower in accessing a file then Centos 6. It's about a 17% difference. Here's a simple test: [root@test-centos6 shm]...
0 votes
1 answer
2k views

Debugging slow wordpress site with strace

I'm trying to get to the bottom of a wordpress site that runs very slowly: on requesting a page, it hangs for around 20 seconds before the page starts to load. I've tried the usual things: WP debug ...
0 votes
2 answers
916 views

SystemTap - filter own syscalls (system-wide trace)

I want to write simple strace-like script using SystemTap. Main goal is to catch only some system calls (like open, close, read, write etc.) for all processes in system. (Can't do that with strace ...
0 votes
0 answers
333 views

Apache strace getsockname call is slow

While load testing I am getting almost 100% CPU usage by Apache processes. To find out the root cause I attached Apache process with strace and found slow calls. 11840 0.000063 accept4(3, {...
0 votes
1 answer
120 views

MySQL sandbox strace option

Latest MySQL Sandbox version uses environment variable SBDEBUG to start mysql instances in debug mode, but i can't pass mysql --debug option. export SBDEBUG=d:t:O,/tmp/client.trace cd ~/sandboxes/...
3 votes
2 answers
1k views

DNS lookups eventually become consistently slow in long lived ruby process

I have a Ruby application running on an Ubuntu server, and this application frequently has to make HTTP requests to other services. Some of those services are on an internal domain, some are ...
4 votes
2 answers
5k views

How to resolve high CPU + excessive stat("/etc/localtime") and clock_gettime(CLOCK_REALTIME) calls

I've been experiencing really high CPU on a ruby on rails app (see stack below) and have been trying to diagnose the possible causes to no avail. Stack: ruby 1.9.3 rails 3.2.6 Apache/2.2.21 (Debian) ...
14 votes
1 answer
16k views

Can strace show me the filename/path for read/write syscalls

If, on Linux, I strace a process, then the reads and writes are shown with the file descriptor handle number. If I look in /proc/$PID/fd I can see the symlinks to the files that correspond to the fd ...
1 vote
1 answer
447 views

nscd works when strace is attaching to the process

I have a server where I am running nslcd to query an AD server, and use it for authorization, and this is working as expected. Now, I introduced nscd to reduce the load on the AD servers. The results ...
1 vote
1 answer
1k views

How do audit changes to dir via symlink?

Use of the auditd system to watch a directory via a symlink hardly triggers any logs. Here is the situation: # pwd /home/root/serverfault # ls -l total 4 drwxr-xr-x 2 root root 4096 Sep 1 15:12 ...
8 votes
2 answers
7k views

tail -f not following log file in Docker container

I am seeing some strange behavior running the tail -f command inside a Docker container in CoreOS. There are a number of variables I can think of that may be contributing to the problem but I am not ...
2 votes
0 answers
1k views

Apache Timeout / Deadlock When MaxClients Reached

I'm running Apache 2.2, preform MPM, on Debian Squeeze with mod_php (PHP 5.3), listening on several ports (with memcached running on the same machine). Over the past 6 weeks or so, I've been ...
0 votes
1 answer
90 views

Intentionally stop a process from responding

Is there any way to intentionally prevent a process from responding - ie. not close or kill it, but stop it dead in it's track, so it immediately stops processing anything? I've often found myself ...
2 votes
0 answers
5k views

strace not showing anything for thread at 100% 'system' CPU

I'm having difficulty with my Python app going to 100% 'system' CPU time across multiple threads for up to 10+ seconds. My (limited) understanding is that 'system' CPU time is time spent in the kernel....
0 votes
0 answers
1k views

Linux high iowait without block device activity

I'm having a hard time figure out the reason cause high iowait on my server. top: %Cpu(s): : 30.0 us, 5.4 sy, 0.0 ni, 53.9 id, 10.1 wa, 0.0 hi, 0.7 si, 0.0 st iostat: Device: rrqm/s ...
1 vote
1 answer
973 views

strange strace output of httpd process of apache running django with mod_wsgi

I have about 12 httpd processes running for an RHEL aws box that no one is hitting in the browser (shared team dev box). These processes together are consuming over 1.8 GB on the dev box, and I have ...
4 votes
1 answer
781 views

debugging irssi using 100% cpu

I have a debian VM I'm running on an ESX4.0 server. This VM hosts a number of users, each running an irssi session inside a screen instance. This is working quite well, except for one user. For ...
3 votes
1 answer
754 views

Apache stops communicating with memcache after creating too many vhosts

I've noticed a very peculiar problem with Apache. I have a very high number of virtual hosts set up - it's around 501. Problems started occuring after vhost number 493. First 493 vhosts work as ...
2 votes
2 answers
3k views

puppet hanging or long time on rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

In our setup, we manage our servers using puppet. Since a few days I saw the puppet client running very slow. When stracing the puppet process I get loads of rt_sigprocmask(SIG_BLOCK, NULL, [], 8) ...
1 vote
2 answers
684 views

TCP packet which is absent in strace log

Can somebody give me ideas about following situation (Linux 2.6.18-348.4.1.el5 ): At some point tcpdump shows [FIN, ACK] packet sent from server port to local client strace log shows no socket ...
6 votes
1 answer
2k views

strace shows long time reading from mysql socket - mysql takes long time to execute query?

My Apache server takes long time to process request. I attached strace to it and can see the two following delays: 1) Very critical (143 seconds to process) 1335 0.000037 write(16, "\235\0\0\0\...
0 votes
1 answer
421 views

upstart - supervisord fork count > 2 (can;t get supervisord to start on boot)

i'm trying to use upstart so that supervisord starts automatically at boot. my supervisord is in a virtual environment. I've configured it to run in foreground mode with -n param and it works if ...
2 votes
2 answers
3k views

process works under strace but not normally

I have a process - a perl script - that does: while true check a POP account on a server on the lan process any email found write logs - messages found, actions taken, errors sleep ...
2 votes
1 answer
297 views

Tracing system calls is slow on a KVM VPS?

I run a website on a KVM VPS and I noticed that processes appear to run extremely slowly when being traced. For example, I ran ls on my home directory, which contains 72 files and directories. With ...
0 votes
1 answer
97 views

How to watch a file, who accesses or uses [duplicate]

I am looking forward a way to watch a file to get following information Which process does open, read, write it? When? Result. (e.g. can they write on it, or can they read it, etc.) Strace helps us ...