Skip to content

Instantly share code, notes, and snippets.

View buttercutter's full-sized avatar

Phung Cheng Fei buttercutter

View GitHub Profile

Using strace and lsof to debug blocked processes

You can use strace on a specific pid to figure out what a specific process is doing, e.g.:

strace -fp <pid>

You might see something like:

select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)

// ----------------------------------------------------------------------
// Copyright (c) 2016, The Regents of the University of California All
// rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// ----------------------------------------------------------------------
// Copyright (c) 2016, The Regents of the University of California All
// rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
@buttercutter
buttercutter / S11.log
Last active April 5, 2019 04:53 — forked from anonymous/S11.log
* gnetlist -g spice-noqsi -o test_active_inductor.net test_active_inductor.sch
AC Analysis Mon Feb 12 23:17:37 2018
--------------------------------------------------------------------------------
Index frequency s11
--------------------------------------------------------------------------------
0 1.000000e+02 9.997594e-01, 1.132451e-13
1 1.001001e+02 9.997594e-01, 1.133585e-13
2 1.002002e+02 9.997594e-01, 1.134718e-13
3 1.003003e+02 9.997594e-01, 1.135852e-13
4 1.004004e+02 9.997594e-01, 1.136985e-13