Checking system uptime on FreeBSD Bsd System

Checking system uptime on FreeBSD

We usually check "sysctl:kernel.boottime" to get uptime on freebsd, but it does not work for version 6 and above. Be obtained by reading the source code uptime the system call,and then through the python to obtain accurate uptime. #!/usr/bin/env python # NOTE: ctypes require python 2.5 import os, sys, datetime from optparse import OptionParser EX_WARN = 1 EX_CRIT = 2 EX_UNKN = 3 try: import ctypes except ImportError: print "UPTIME CRITICAL: Python ctypes required (Python 2.5 or greater)" sys.exit(EX_CRIT) class...
Download Chrome Standalone MISC

Download Chrome Standalone

Nomal online download address: Offline download address: zh_CN offline download address:
Scooter feat. Vicky Leandros - C'est Bleu MISC

Scooter feat. Vicky Leandros – C’est Bleu

Aha, finally fount it. Of course, code for inserting flv like these: $embed$ src="" allowfullscreen="true" flashvars="vcastr_file="flv url"&LogoText="text"" quality="high" pluginspage="" type="application/x-shockwave-flash" width="450" height="363">$/embed$ "$$"->"<>"
NoMachine NX for LinuxMint V12 Linux System

NoMachine NX for LinuxMint V12

First: Install software into your system, command like: sudo apt-get install openssh Second: Download nxclient/nxnode/nxserver from, and install them step by step, command like: sudo dpkg -i ***.deb Third: Edit /etc/ssh/sshd_config, and modify or add (more…)
Installing Win7_X64 & XP_X86 on the same HD Windows System

Installing Win7_X64 & XP_X86 on the same HD

1. install win7 nomaly (etc "partition C:"); 2. active other partition (NOT C:); 3. install xp nomaly to you had actived partition ago; 4. then boot your computer by CD or UDISK (win 7), and into the command line; 5. use this command: bootrec /rebuildbcd 6. sometime you also copy bootmgr to your win7's partition 7. use this command: bcdedit /store c:\boot\bcd /create {ntldr} /d "Windows XP" bcdedit /store c:\boot\bcd /set {ntldr} device boot bcdedit /store c:\boot\bcd /set {ntldr} path...
Increase LaTeX support Linux System

Increase LaTeX support

By wp latex. Look like: \begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix} f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases} f(x)= \sum_{n=0}^\infty a_n x^n= a_0+a_1x+a_2x^2+\cdots
Shell Tips Linux System

Shell Tips

ICONV Directory for i in `find ./ -name *.htm` ; do echo $i;iconv -f gb18030 -t utf8 $i -o /tmp/iconv.tmp;mv /tmp/iconv.tmp $i; done or find -name "*.htm" \ -exec iconv -f gb2312 -t utf8 '{}' -o /tmp/iconv.tmp \; \ -exec mv /tmp/iconv.tmp '{}' \; RM nodecode files ll -i //list all files inum find ./ -inum 12345 -print -exec rm {} -rf \; Convert image files find * | xargs -l -i convert -density 150 -quality 100 -resize x1240 {}...