[Perl] last logs v1.3
作者:reistlin 发布时间:January 27, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/128
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
[https://reistlin.googlecode.com/svn/trunk/perl/last_logs2.pl]
[... Localhost ...]
作者:reistlin 发布时间:January 27, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/128
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
[https://reistlin.googlecode.com/svn/trunk/perl/last_logs2.pl]
作者:reistlin 发布时间:January 21, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/127
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
[root@reistlin.com ~]# e2label /dev/sdb1 /home1 [root@reistlin.com ~]# e2label /dev/sdc1 /home2
[root@reistlin.com ~]# mkdir /home{1..2}
[root@reistlin.com /]# ls -l total 160 drwxr-xr-x 2 root root 4096 Jan 21 12:25 home1 drwxr-xr-x 2 root root 4096 Jan 21 12:25 home2
作者:reistlin 发布时间:January 21, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/126
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
[root@reistlin.com ~]# mkfs.ext3 /dev/sdb1 mke2fs 1.39 (29-May-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 122109952 inodes, 244190000 blocks 12209500 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 7453 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000, 214990848 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
作者:reistlin 发布时间:January 21, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/125
更新时间: 2011.01
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
[root@reistlin.com ~]# fdisk -l Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System
[root@reistlin.com ~]# fdisk /dev/sdb The number of cylinders for this disk is set to 121601. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help):
Command (m for help): m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition''s system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)
作者:reistlin 发布时间:January 13, 2011 分类:自由点击
TCP 連線在各種狀態之間變動的狀況與順序,其中 TIME_WAIT 連線已經是 TCP 連線在 完全關閉連線狀態 (CLOSED) 之前的一個狀態 (註:完全關閉連線是指網路完整斷線的意思),而預設 TIME_WAIT 的逾時時間為 MSL (Maximum Segment Lifetime) 時間的兩倍,在 RFC 793 規格定義的 MSL 為兩分鐘,也就是在預設的情況下,每一條連線從 打算關閉連線狀態 (Closing) 換到 完整關閉連線狀態 (Closed) 之間還會停留在 TIME_WAIT 狀態約 4 分鐘的時間,如果你 4 分鐘以內使用者建立的連線數超過 65536 條連線的話,那麼很這台伺服器就再也無法連接了。 ( 註:Windows 預設的 TIME_WAIT 時間為 4 分鐘,Linux 下則會依據不同 Distribution 版本而有不同的預設值,但都可以調整其時間長短 )
作者:reistlin 发布时间:January 13, 2011 分类:自由点击
[IANA (Internet Assigned Numbers Authority)] 提供了一个在线检测工具,可以检测出 DNS Server 或者 ISP DNS Server 是否存在 DNS Cache Poisoning 漏洞。
1,Highly Vulnerable - 高风险(红色)
2,Vulnerable - 风险(棕色)
3,Safe - 安全(绿色)
作者:reistlin 发布时间:January 12, 2011 分类:随写随意
白樺 青空 南風 こぶし咲くあの丘
北國のあ 北國の春 季節が
都会では わからないだろと
届いたおふくろの小さな包み
あの故里へ帰ろかな 帰ろかな
雪解け せせらぎ 丸木橋
からまつの芽がふく
北國のあ 北國の春
好きだとお互いに 言い出せないまま
別れてもう五年あの娘は どうすてる
あの故里へ帰ろかな 帰ろかな
山吹き 朝霧 水車小屋
わらべ唄聞こえる
北國のあ 北國の春
あにきもおやじ似で 無口なふたりが
たまには酒でも 飲んでるだろか
あの故里へ帰ろかな、帰ろかな
作者:reistlin 发布时间:January 12, 2011 分类:原创文章
作者: reistlin
来源: http://www.reistlin.com/blog/118
更新时间: 2007.03
版权声明: 原创文章.转载请保留作者信息和原文完整.谢绝任何方式的摘要
Command Line 模式:
clish
命令行帮助:
TAB
显示网络接口:
show interfaces
设置 IP 地址:
add interface eht1 address 192.168.1.1/24
设置接口速率/双工模式:
set interface eht1 duplex full set interface eht1 speed 100M
删除 IP 地址:
delete interface eht1 address 192.168.1.1/24
设置 VLAN:
add interface eht2 vlanid 100 address 192.168.2.1/24
设置静态路由:
set static-route 172.16.1.0/16 nexthop gateway address 192.168.1.1 on priority 1
设置默认网关:
set static-route default nexthop gateway address 192.168.1.1 on priority 1
保存配置:
save config
退出:
exit
作者:reistlin 发布时间:January 12, 2011 分类:随写随意
1、好了,好了,知道,真罗嗦!
2、有事吗,没事?那挂了啊。(父母打电话,也许只想说说话,我们能否明白他们的用意,不要匆忙挂了电话?)
3、说了你也不懂,别问了!
4、跟你说了多少次不要你做,做又做不好。(一些他们已经力不能及的事,我们因为关心而制止,但不要这样让他们觉得自己很无用。)
5、你们那一套,早就过时了。(父母的建议,也许不能起到作用,可我们是否能换一种回应的方式。)
6、叫你别收拾我的房间,你看,东西找都找不到!(自己的房间还是自己收拾好,不收拾,也不要拂了老人的好意。)
7、我要吃什么我知道,别夹了!(盼着我们回家的父母总想把所有关心融在特意做的菜里,我们默默领情就好。)
8、说了别吃这些剩菜了, 怎么老不听啊!(他们一辈子的节约习惯,很难改,让他们每次尽量少做点菜就好。)
9、我自己有分寸,不要老说了,烦不烦!
10、这些东西说了不要了,堆在这里做什么啊!(他们总想把跟我们成长有关的东西都收藏起来,也许占满房间,多年后,看到自己还是婴儿时的小棉袄,是不是很惊喜。)