Skip to content
Sep 2 11

Setting up net-mgmt/cacti

by jackqq

Cacti is a network device monitor and graphing tool utilizing SNMP and RRDtool.

Procedures to set up:

  1. install ports: net-mgmt/cacti, net-mgmt/cacti-spine
  2. install fastcgi for apache: www/mod_fcgid
  3. follow instructions from ‘pkg_info -Dx cacti’
  4. configure apache22, see cheatsheet:apache php mod_fcgid
  5. enable mysql and apache22 in /etc/rc.conf
  6. mysql_enable=yes
    apache22_enable=yes
    apache22_profiles="01"
    apache22_01_configfile="/usr/local/etc/apache22/httpd.01.conf"
  7. start services

Procedures to kick start:

  1. (Navigation Sidebar) Devices, Add. Host Template = Generic SNMP (for 3Com switches).
  2. (Device page) Create Graphs for this Host. Graph Types = All (or SNMP). Multi-select items to draw graphs for.
  3. (Navigation Sidebar) Graph Trees, Add. Tree Item Type = Host.
  4. wait for 5 mins, or php poller.php --force. Watch …/cacti/log/cacti.log.
  5. (Top) graphs.

Voila!


Custom settings:

  • Graph Template, Traffic:
    • Auto Scale: no
    • Per-Graph Auto Scale: yes
    • Rigid Boundaries: no
    • Upper Limit: 10000000
  • Settings, Poller:
    • Poller Type: spine
    • Max Threads Per Process: 4
  • Settings, Visual
    • Font Size: Axis = 7, Unit = 8, Legend = 8, Title = 10
    • Font Name: Bitstream Vera Sans Normal (or Mono)
Sep 1 11

Google Chrome 的离线数据

by jackqq

Google Chrome 浏览器一直支持本地存储。现在 Google 又重新支持了离线的 Gmail,将来还可能支持 Calendar。这样一来,邮件、日历、联系人等等都会缓存在本地磁盘上。

这些数据存储在一些 SQLite 数据库里,它们的位置是:

  • 以前用 Gears 时,在 [chromeuser]\Plugin Data\Google Gears 里。
  • 现在用 HTML5 时,在 [chromeuser]\databases 里。

其中 [chromeuser] 即用户数据目录,一般位于 %localappdata%\Google\Chrome\User Data\Default

要保护这些数据,就应对数据库位置配置权限或加密。

Aug 29 11

HTC Desire S 调试界面

by jackqq

HTC Desire S 调试界面。在电话拨号界面中用拨号键输入以下序列:

  • *#*#info#*#* 手机信息、电池信息等
  • *#*#diag#*#* 诊断工具:灯、屏幕、按键等

注: info = 4636;  diag = 3424

参考:HTC购买注意事项

Aug 16 11

portsnap on FreeBSD 8.1

by jackqq

Running portsnap(8) on FreeBSD 8.1-RELEASE requires 256MB system RAM to avoid any ‘Killed’ process. Memory requirement may increase for a server running daemon processes.

Aug 16 11

Mounting ISO on FreeBSD

by jackqq
# mdconfig -a -t vnode -f /path/to/file.iso
md0
# mount_cd9660 -o ro /dev/md0 /mount-point
Aug 16 11

Test DHCP server using nmap

by jackqq

Test DHCP server using nmap:

nmap -n -sU -p67 --script=dhcp-discover.nse dhcp.server.address
Aug 16 11

Building Internet performance benchmark tools on Ubuntu

by jackqq

1/1/10

install packages on Server: binutils, gcc, libssl-dev
install packages on Desktop: patch, libssl-dev

building dnsperf on Ubuntu

install packages on Desktop: libbind-dev, libkrb5-dev, libssl-dev, libcap-dev, libxml2-dev

Aug 16 11

拆装 SONY 小本 VGN-T17C/S

by jackqq

2011-02-17
拆装了很老的 SONY 小本 VGN-T17C/S,为了拆它的内存,终于发现原来它的原装内存是焊在主板上的,只能加不能拆,而且显然不是常规的笔记本内存。还发现要看内存只需把键盘拆下来就行,拆键盘需要拧背面的三个螺丝,箭头尾部有个黑点,然后翻过来机身正面,键盘顶部有两个小卡子,翘起来抽出即可。键盘下面、转轴左边还有螺丝,是拆机壳用的。

Aug 16 11

在 Google Calendar 中搜索

by jackqq

要在 Google Calendar 里搜索带中文的事件,只需要加上半角的引号即可。
http://www.google.com/support/forum/p/Calendar/thread?tid=2d9a637130e5fbed&hl=en

Aug 12 11

Offline Maps on mobile devices

by jackqq

Creating: TrekBuddy_Atlas_Creator_1.6_final_SQLite

Android application: RMaps