Skip to content

Tag: linux

Given a PPID, how to find all of associated PID?

It might be a weird question as I searched and found many people asking about how to find the PPID given a PID. However, I’m interested in finding out all the PID of a given PPID. The incentive was to run a process check using pidstat and from my test with pidstat, it seems to be that pidstat only repor…

SIGALRM, interval timers and problems with sleep()

I am working with porting one of our embedded microcontroller libraries to linux and writing a python wrapper around it. One of my low level modules depends on a callback that gets called every 10ms. This callback counts up software timers that each have callbacks of their own. These timers are used all over …

Communicating with CashCode bill acceptor in linux

I’ve implemented CCNET protocol to communicate with CashCode bill acceptor from my software on Linux. Initially I spent lots of time trying to figure out why the device does not respond to the commands I’m sending. Using trial-and-error method I found the solution to set the following options for …

why file with hole has smaller disk block than file without hole?

I’m newbie in unix system programming There is code making file with hole. Output result is: Why file with hole has fewer disk block than file without hole? In my thinking, file without hole takes smaller disk blocks Because file with hole is more spreaded than without hole.. From “Advanced Progra…

Linux Bash XMLLINT with XPATH

Today I get to learn how to use xmllint properly. It does not seem to be well covered or explained. I plan to use a single language resource file to run my entire system. I have a mixture of bash scripts and php pages that must read from this language file. Currently I am using the following format in my