High Resolution Timer

While working for at Persistent Systems Pvt. Ltd., Pune, we developed a small library with Java and C++ wrappers to implement very high resolution timers. We use these timers to count the ticks when doing performance analysis and stuff like that. I would like to thank Nikhil Deshpande and Chandraprakash Jain, my seniors at work, in helping me out while I was working on this tool. Infact, the java wrapper for this library is a contribution from Nikhil.

The library I developed exploited the system dependent timers / clocks and provided a timer like interface to the same. The library, compiles and functions on Linux, Solaris and Windows. The attached file, has build scripts for Linux and Solaris. There is also a Java wrapper over the library, which uses JNI to use the timer interfaces.

My observation is that while Linux system timers allow a resolution to count till microseconds, a Solaris box can provide resolution to nanosecond levels.

The code is pretty dirty when it comes to system specific decisions, but provides a clean interface - complete with error message details, error handling, easy to use functions, extensible and customizable design.

The ReadMe.txt file, explains some of the stuff that I've done. Click here to read the file, without having to download the entire code. The library is LGPL licensed - you are free to use, redistribute and modify the same to suit your requirement, as long as you confirm the license agreement.

Click on the links below to download the source code for the high resolution timer library :

freshclam: "Problem with internal logger"

I had a happily running server with clam-av-0.88 (Clam Antivirus version 0.88). Suddenly, I started getting cron messages, regarding "freshclam-sleep" spitting out an error message "ERROR: problem with internal logger".

After a bit of searching, our first hit was that there was a permission issue. However, that was not the case for me.

The solution finally was that I had to restart the freshclam daemon. From the commmand :

ps aux | grep clam


I realised that there was a stray freshclam-sleep process runing. The oputput looked like this :


qscand 2056 0.0 0.9 81384 38820 ? Ss 2006 20:13 /usr/sbin/clamd
qscand 2064 0.0 0.0 2548 1072 ? Ss 2006 0:01 /usr/bin/freshclam -d -p /var/run/clamav/freshclam.pid
root 1454 0.0 0.0 2260 936 ? Ss Mar28 0:00 /bin/bash /usr/share/clamav/freshclam-sleep
qscand 12425 0.0 0.0 2544 1004 ? S Mar28 0:00 /usr/bin/freshclam --quiet
root 17913 0.0 0.0 3860 668 pts/0 S+ 05:30 0:00 grep clam



I just killed all the freshclam processes, deleted the lock file for freshclam and started the daemon with


/sbin/service freshclam start


and voila everything started working like a champ!!!

That was pretty much it....
Hope that helps.

Madhur Tanwani himself!!!

Friends, here is something that you can always use to find out anything
about myself. This blog will help people know more about me - Madhur
Kumar Tanwani. I'll try keeping it as updated as possible.

Name : Madhur Kumar Tanwani

Contact Email : madh...@gmail.com

Date of Birth : 15th June

Contact Details :


Home Address :
"GODHAN",
Saubhagya Nagar,
Lam Road,
Nashik Road,
Nashik - 422101,
Maharashtra,
India.
Current Address :
Madhur Kumar Tanwani,
"AALAYAM", Site 25 & 26,
Door No 8, 2nd Cross,
Near Suhag Residency,
Seenappa Layout,
Sudda Gunta Palya,
C.V. RamanNagar,
Bangalore-560093,
Karnataka, India.
Mobile : +91-9739973184

Office Address :

Microsoft India (R&D) Pvt Ltd.,
Global Technical Support Center,
Signature building,
Embassy Golf links Business Park,
Off Intermediate Ring Road,
Domlur,
Bangalore - 560071.

More Details About Me : 

IPtables - What TABLES are in there?

I was reading on the internet about IPtables and came accross the "-t" flag. Wondering what it was i was forwarded to the TABLES used within IPTABLES. Here is te exceprt from it and the link to the actual plage.

Linuxtopia - Linux Packet Filtering and iptables - Tables:
Linux Packet Filtering and iptables
Chapter 9. How a rule is built - Tables

The -t option specifies which table to use. Per default, the filter table is used. We may specify one of the following tables with the -t option. Do note that this is an extremely brief summary of some of the contents of the Traversing of tables and chains chapter.
 
Moviehole-madhurtanwani © 2010 | Designed by Chica Blogger | Back to top