strace

Check status of a production ASP.NET process

Hi all. Is there a way to check what a asp.net process is doing in production environment? In Linux, one can run a strace on a process id and know exactly what the process is doing. Can one do something similar on a asp.net process? Googling around tells me that you need to create dump files and then analyze the problem there, but wh...

APC Enabled but Apache Still Opening Files?

Hey guys, I'm working on a high-traffic webserver farm serving dynamic PHP code which includes around 100 files on most requests. APC opcode cache is enabled, include_once_override is enabled, and I have allocated 64MB ram to the cache, yet when I strace an apache process I still see it open()ing and stat()ing all of these includes for ...

strace java applet

I'm trying to strace a java applet, and strace doesn't seem to be working. I'm calling the following function. public static void testSTrace(){ long c = 0; for (int i = 0; i < 1000; i++){ long start = System.nanoTime(); try{Thread.sleep(0, 100);}catch(Exception e){/*cry*/} long stop = System.nanoTime(); log.info("start : " ...

ltrace equivalent for osx?

osx has the really powerful dtrace/ktrace/dtruss tools - however i'm not willing to invest the time necessary to learn dealing with them right now. what's the easiest way to get the equivalent functionality of linux ltrace (and possibly strace) on OSX? ...

Adding custom struct types to strace

I'm trying to reverse-engineer a user-mode shared object that interacts with a kernel driver via ioctl syscalls. I have a header file with definitions for the kernel driver's ioctl interface (i.e. #defines for ioctl command numbers, and struct definitions for the various data sent to ioctl). I see that strace has the ability to de-refe...

Supercat config files

Anybody knows a repository for supercat (http://supercat.nosredna.net/) config files? I am specially interested in colorize strace output files. ...

Equivalent of strace -feopen < command > on mac os X

This is useful for debugging (hence programming related). On linux, we can use the command strace -feopen python myfile.py to figure out which python modules and shared objects are loaded. Is there an equivalent one-liner on macOS X? ...

how to intercept linux signals ? (in C)

hi everyone, I need to intercept and trace signals from any binaries, like strace does it under linux. I don't need a so verbose output like the real one strace. I just want to know how it works, how can I intercept signal and how can I trace them. Thanks in advance :) ...

Unable to "strace -p" on a running JBoss process

I am trying to use "strace -p" to attach to an already running JBoss process. JBoss is using the 1.5.0_15 Java JDK. Unfortunately, this doesn't work - I only get a single futex() result: # strace -p 3388 Process 3388 attached - interrupt to quit [ Process PID=3388 runs in 32 bit mode. ] futex(0x8f18f7c, FUTEX_WAIT_PRIVATE, 1, NULL <unfi...

What interprocess locking calls should I monitor?

I'm monitoring a process with strace/ltrace in the hope to find and intercept a call that checks, and potentially activates some kind of globally shared lock. While I've dealt with and read about several forms of interprocess locking on Linux before, I'm drawing a blank on what to calls to look for. Currently my only suspect is futex()...

how do i use strace to know about system calls in my C program

Hi all, I wanted to know how can i use strace function to trace system calls in my C program and also use it for debugging my code. regs adi ...

executing service (openoffice headless) in chroot is slow

I created an ubuntu chroot environment (using debootstrap) and started openoffice as a service to convert files using unoconv. It works but it spends about 20s to do conversions which are below 1s outside chroot jail. Stracing it I can see that this extra time is spent in some socket operations whose timeout expires, the same operations ...

using strace with mpiexec

Hello How to strace all processes of mpi parallel job, started with mpiexec (mpich2, linux)? -o will mess outputs from different processes ...

How can get dtrace to run the traced command with non-root priviledges ?

OS X lacks linux's strace, but it has dtrace which is supposed to be so much better. However, I miss the ability to do simple tracing on individual commands. For example, on linux I can write strace -f gcc hello.c to caputre all system calls, which gives me the list of all the filenames needed by the compiler to compile my program (th...

Why apache is recv()-ing something for 15 sec every time?

I have ZendFramework based application that is using XMLRPC communication to other ZendFramework app. Both are on the same server (for development). That communication is very slow, and I am trying to find out why. After profiling, I got to the point where there is a slowdown within fgets() of ZF Lib XMLRPC reader. While strace-ing Zen...

Python file.read() grabs more data than necessary, under the hood.

cat file_ro.py import sys def file_open(filename): fo=open(filename,'r') fo.seek(7) read_data=fo.read(3) fo.close() print read_data file_open("file.py") But strace says readlink("file_ro.py", 0x7fff31fc7ea0, 4096) = -1 EINVAL (Invalid argument) getcwd("/home/laks/python", 4096) = 18 lsta...

PHP CLI Script (Zend Framework) hangs

Hi folks, I am running a PHP Script on the CLI (logged in as root). It is actually building a Zend Lucene Search index. All output is logged to the command line. PHP directves like max_execution_time and memory_limit are set sufficient (0 resp. 1024M). The error reporting is set in the script as follows: error_reporting(E_ALL | E_STR...

Unix strace command

I found the following bash script in order to monitor cp progress. #!/bin/sh cp_p() { strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \ | awk '{ count += $NF if (count % 10 == 0) { percent = count / total_size * 100 printf "%3d%% [", percent for (i=0;i<=percent;i++) ...

List of installed Debian packages - but with a twist!

I have an old Debian box that I used heavily over a long period of time that will no longer boot cleanly, so I pulled out a new Ubuntu Live CD to give it a second chance at life. I backed up all my files, but now I want to review what packages I had installed. Problem: It appears that the dpkg maintainers only expect a person to do this ...

Unknown open() flag passed by execve()

When executing a bash script located on my FUSE filesystem, an open() call is made with these flags: debug,cpfsfuse.c(62),cpfs_fuse_open: path "/make.sh", flags 0100040 The flags (0100040) should correspond to those passed in parameter 2 of open(). The unknown flag originates from an execve() call: matt@stanley:~/cpfs/dir$ strace -f ....