Questions tagged [strace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
50 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 ...
1
vote
2answers
124 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
0answers
208 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 ...
0
votes
0answers
65 views

Understanding strace output to identify poor app performance

I have a server application which accepts connections from a client app, and runs pretty much continuously. The problem is that after this server process has been running for a few hours, its ...
0
votes
1answer
83 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
1answer
75 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?
0
votes
1answer
505 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
1answer
199 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 root@1.2.3.4 Failed to mount cgroup2: No such file or directory I know my kernel supports cgroup2: [...
0
votes
1answer
25 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, ...
2
votes
1answer
615 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
2answers
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
1answer
1k 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
0answers
203 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, {...
3
votes
2answers
740 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 ...
10
votes
1answer
6k 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
1answer
336 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
2answers
1k 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
1answer
558 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 ...
1
vote
0answers
683 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
1answer
64 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
0answers
3k 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
0answers
873 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 ...
7
votes
2answers
6k 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 ...
1
vote
1answer
593 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 ...
0
votes
2answers
656 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 ...
3
votes
1answer
632 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 ...
1
vote
2answers
464 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
1answer
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
1answer
391 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
2answers
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 ...
0
votes
1answer
53 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 ...
2
votes
1answer
252 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 ...
2
votes
0answers
1k views

Apache web server maxing out due to processes stuck at D status

I have a Apache 2.2.3 web server running on a 8 core VM with 8G Ram. During a load test, the web server stopped responding and load average went up to 1000. When I run Top command, I see a large ...
3
votes
2answers
673 views

MySQL hangs if connection comes from outside the LAN

I have a MySQL Server operating just fine if I access him from his local LAN (192.168.100.0/24). If I try to access hin from another LAN (192.168.113.0/24 in this case) it hangs for a really long time ...
0
votes
1answer
93 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/...
1
vote
1answer
144 views

Debugging high CPU load when adding new domain inside server's control panel

When adding a new domain inside my server's control panel it takes much longer than usual since some time. CPU shows 100% usage on one core and strace reports something like this: poll([{fd=7, ...
-1
votes
3answers
2k 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 ...
1
vote
1answer
549 views

mongodb mystery crashes with sigkill under strace

I have a mongodb instance that seems to crash roughly once a day. I don't see any useful information in the mongo log file. All is well and then the process is just crashed with no additional ...
0
votes
1answer
656 views

strace vs. log4cxx performance hit?

I need to debug some issue on a production server, and I'm trying to decide whether to use strace or the log4cxx logging library; one crucial characteristic I need to know before, is which of the two ...
4
votes
0answers
766 views

mysql client slow login strace

I am experiencing an issue with slow connections/logins to a loaded mysql server, even when connecting via the unix socket file (CentOS 6.3). Queries are completing very quickly -- (0.00 sec) in this ...
19
votes
6answers
95k 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 ...
1
vote
3answers
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 ...
0
votes
1answer
91 views

Trying to diagnose bottleneck for apache

I am trying to diagnose bottleneck for a apache(v 2.0.52) server using strace. It looks like call to poll is slowing the process. Below is one example poll([{fd=10, events=POLLIN}], 1, 120000) = 0 &...
0
votes
1answer
410 views

Interfacing strace with Process Name instead of PID

How do I implement a wrapper script pstrace in bash that changees the interface of [sudo] strace -c -p [PID] to [sudo] pstrace -c -p [PROCESS-NAME] similar to how killall [PROCESS-NAME] is used....
0
votes
2answers
3k views

Apache strace to hunt down a memory leak

We have a server with a memory issue: the server keeps allocating itself memory and doesn't release it. We're running Apache. I set MaxReqsPerClient to a really low value just so the threads don't ...
3
votes
2answers
4k 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) ...
3
votes
4answers
5k views

Apache process consumes too much CPU

I have an ubuntu apache/php server running php doing appx 100 hits/sec and a PHP cron running in the background. I get occasionally high CPU load on one of the Apache processes which stays high ...
1
vote
3answers
1k views

WSGI cannot access a file, but permissions are correct

I am debugging a problem where MoinMoin on CentOS is throwing a permissions error, but I can't track down where the problematic file / directory is. I ran strace -vp <pid> on the apache pid; ...
2
votes
1answer
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....
0
votes
1answer
70 views

monitor processes in citrix

Where I work, We've been having trouble with certain applications mysteriously crashing/hanging in citrix; the primary culprits are IE8 and a certain .net-based industry specific app that we use. I'...