跳至主要内容

博文

目前显示的是标签为“tool”的博文

Install `nicstat`on Linux

Introduction nicstat is to network interfaces as “iostat” is to disks, or “prstat” is to processes. It is designed as a much better version of “netstat -i”. Its differences include: Reports bytes in & out as well as packets. Normalizes these values to per-second rates. Reports on all interfaces (while iterating) Reports Utilization (rough calculation as of now) Reports Saturation (also rough) Prefixes statistics with the current time With the help from nicstat , we can identify whether distributed Java application is saturating the network by view the utilization percentage of specific interface. Download Sourceforge Download Link Build Following the guide of README.txt, we build like following: $ mv Makefile.Linux Makefile $ make mv nicstat `./nicstat.sh --bin-name` Install $ make install gcc -O3 -m32 nicstat.c -o nicstat In file included from /usr/include/features.h: 392 : 0 , from /usr/include/stdio.h: 27 , from nicsta...

Interesting bug of intellij decompiler

Strange char When I view the source of a project, I notice it use log4j. So, I click into the logger.error method, and intellij decompile the class file and show the following code: public void error (Object message, Throwable t) { if (! this .repository.isDisabled( '鱀' )) { //<--here if (Level.ERROR.isGreaterOrEqual( this .getEffectiveLevel())) { this .forcedLog(FQCN, Level.ERROR, message, t); } } } I was attracted by that strange character, because this character is so rare, so who would use such char in the code? There must be some reason. Real source It is strange, right? I am curious about that strange character so I find the source as following: void error(Object message, Throwable t) { if (repository.isDisabled(Level.ERROR_INT)) return ; if (Level.ERROR.isGreaterOrEqual( this .getEffectiveLevel())) forcedLog(FQCN, Level.ERROR, message, t); } // Level.ERROR_INT public final static int ERROR_INT = 40000 ...