How to build custom mfsbsd images. Bsd System

How to build custom mfsbsd images.

Generation of mfsbsd image You can generate your own mfsbsd image (see below) or just get one of the Testing/Beta ones from MFSBSD8. In the latter case, you will need to also download the original kernel.txz from a FreeBSD mirror site because by default mfsbsd does not include the geom_eli module and its dependencies (zlib, crypto). The generic image will just use DHCP to get all its network related data and start sshd. Just connect with the mfsroot password by...
阅读全文
snmpdiskio for ubuntu 13.10 LTS Bsd System

snmpdiskio for ubuntu 13.10 LTS

Step by Step: 1.sudo apt-get install snmp snmpd snmp-mibs-downloader  2.Download snmpdiskio package from "http://forums.cacti.net/viewtopic.php?f=12&t=12742" and following README 3.Edit profiles for snmpd: 『/etc/snmp/snmpd.conf』 agentAddress udp:127.0.0.1:161 view systemonly included .1.3.6.1.2.1.1 view systemonly included .1.3.6.1.2.1.25.1 view systemonly included .1.3.6.1.2.1.2 extend .1.3.6.1.4.1.2021.54 hdNum /usr/local/bin/snmpdiskio hdNum extend .1.3.6.1.4.1.2021.55 hdIndex /usr/local/bin/snmpdiskio hdIndex extend .1.3.6.1.4.1.2021.56 hdDescr /usr/local/bin/snmpdiskio hdDescr extend .1.3.6.1.4.1.2021.57 hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks extend .1.3.6.1.4.1.2021.58 hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks 『/etc/snmp/snmp.conf』 mibs : 『/etc/default/snmpd』 export MIBS=/usr/share/snmp/mibs SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I interface,ifTable,ifXTable,cpu,cpu_linux,hw_mem,extend,versioninfo,snmp_mib,ip,at,system_mib -smux,mteTrigger,mteTriggerConf -p /var/run/snmpd.pid'  4.Download...
阅读全文
CTEX KIT TIPS Bsd System

CTEX KIT TIPS

for package fontspec: edit $texlive/texmf-dist/tex/latex/ctex/engine/ctex-xecjk-engine.def % ctex-xecjk-engine.def: for XeTeX engine with xeCJK % vim:ft=tex % compatibility with amssymb.sty etc and xunicode.sty v0.95+ \RequirePackage{savesym} \def\CTEX@save@symlist{hbar,Finv,aleph,beth,gimel,daleth,Game} \@for \reversed@a:=\CTEX@save@symlist \do{% \savesymbol{\reversed@a}} \RequirePackage{fontspec} \RequirePackage{xeCJK} \defaultfontfeatures{Ligatures=TeX} \@for \reversed@a:=\CTEX@save@symlist \do{% \restoresymbol{UTF}{\reversed@a}% \expandafter\ifx \csname\reversed@a\endcsname \relax \expandafter\let \csname\reversed@a\endcsname \CTEX@undefined \fi} \let\CTEX@save@symlist\CTEX@undefined \ifCTEX@punct \punctstyle{quanjiao} \else \punctstyle{plain} \fi \input{ctex-cjk-common.def} \ifCTEX@nofonts\else \ifCTEX@winfonts \input{ctex-xecjk-winfonts.def} \else\ifCTEX@adobefonts \input{ctex-xecjk-adobefonts.def} \fi\fi \fi \endinput for winfonts for ctex-xecjk $texlive/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.def % ctex-xecjk-winfonts.def: Windows 的 xeCJK 字体设置,默认为六种中易字体 % vim:ft=tex \setCJKmainfont{SimSun} \setCJKsansfont{SimHei} \setCJKmonofont{FangSong} \setmainfont{Times New Roman} \setsansfont{Droid Serif} \setmonofont{Droid Sans...
阅读全文
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...
阅读全文
Write blog with Emacs Bsd System

Write blog with Emacs

Emacs can be annoying to switch to something else for a text oriented task. With weblogger.el you can writting to your blog without ener leaving Emacs. I have wordpress installed,but it should work for any other blogging software with the same XMLRPC interface. Getting and Starting First getting the latest copy of webblogger.el and xml-rpc.el from Savannah. Just click the *.el file and then click "download". Once you've gotten both webblogger.el and xml-rpc.el place them somewhere that your Emacs can...
阅读全文
Screen, some tips Bsd System

Screen, some tips

Config Files: /etc/screenrc or ~/.screenrc CJK Support: Edit config files, then add these: defencoding utf-8 encoding utf-8 utf-8 If garbled, input these in screen process: Ctrl+a :encoding utf-8 utf-8
阅读全文