Linux 中有一种“死不瞑目”的进程,叫僵死进程(zombie)。一句话定义僵死进程:In UNIX System terminology, a process that has terminated, but whose parent has not yet waited for it, is called a zombie. 这些进程可以通过 ps 命令查看:ps -el ,带有 Z 标记的为僵死进程。也可以 ps -ef | grep defunc
一个进程exit()后,内核会将它的exit status 转换为 termination status,并由内核记录。可见这个结束的进程并没有真正的被销毁,虽然它已经不占用任何内存和cpu资源,没有任何可执行代码,也不能被调度,但却残留在进程列表里,一旦这种进程过多,系统性能肯定受其影响。这就需要它的父进程为它“收尸”,来获取已经terminate的子进程的终止状态(通常由wait() 和waitpid() 来完成)。如果父进程在子进程之前退出,子进程会变成僵死进程了么…?不会………
永中Office出了2009个人集成版,而且完全免费使用~最主要,它有Linux平台的版本
今天有空,在SuSE下装之。功能 字体感觉比OpenOffice要好,估计在Win下可以取代MS Office了,嘿嘿。。。
SuSE安装步骤:
1.在http://www.evermoresw.com.cn/webch/download/downEIOPersonal.jsp下载Linux版本
2,解压包
tar zxvf EIOffice_Personal_Lin.tar.gz
3.安装
这里说一下,开始直接运行setup.sh文件,弹出的安装对话框一片空白。之前安装其他版本的永中Office也是这种情况。不过SuSE用户别灰心,JAVA运行边可以搞定
java -jar dispose.jar
一路下一步,OK
4.小小的配置
jiayi的机器运行永中Office,弹出的界面依然空白……想是不是GTK库不兼容…Baidu找到症结,编辑/usr/bin/eio
vi/usr/bin/eio
看到开头几句,有点崩溃。。。
#!/bin/bash
if
………
一文件,格式如下:
192.168.1.1 command1
192.168.1.2 command2
192.168.1.3 command3
192.168.1.4 command4
……….
第一列是写主机IP列表,第二列是不同的命令
现在求的脚本要实现这样的功能:
要在一台主控机上分别登陆第一列列出的ip在该台主机上执行对应的command
这个问题不管两台主机之间有没有做过信任,expect + awk 都可以搞定
解:
假设用户root,端口22。
ssh.exp文件:
#!/usr/bin/expect
set timeout 100
set ip [lindex $argv 0]
setcommand[lindex $argv1]
spawn ssh root@$ip
expect "#"
send "$command\r"
expect "#"
send "
………
最近参加活动的讲座都是英文,听起来蛮吃力…有时候别人听懂了在那笑,我却想哭。。。
听力不地,口语也受影响…和老外说英语很尴尬,有时干脆和他讲中文。。。
从今天起,开始听英语新闻,看些口语资料,有机会也和同学说两句。
1. I see. 我明白了。
2. I quit! 我不干了!
3. Let go! 放手!
4. Me too. 我也是。
5. My god! 天哪!
6. No way! 不行!
7. Come on. 来吧(赶快)
8. Hold on. 等一等。
9. I agree。 我同意。
10. Not bad. 还不错。
11. Not yet. 还没。
12. See you. 再见。
13. Shut up! 闭嘴!
14. So long. 再见。
15. Why not? 好呀! (为什么不呢?)
16. Allow me. 让我来。
17. Be quiet! 安静点!
18. Cheer up! 振作起来!
19. Good job! 做得好!
20. Have fun! 玩得开心!
21. How much? 多少钱?
22. I’m full. 我饱了。
23. I’m home. 我
………
File system
| Super Block |
Group Descriptors |
Block Group 1 |
Block Group 2 |
… … |
Block Group N |
| Block Bitmap |
Inode Bitmap |
Inode Table |
Data Blocks |
From the figuires above we get:
Every block group is associated with a group descriptor. All of the group descriptors are congregated following the Super Block tightly.
In the group descriptor,there is a pointer points to the refered b………
Today encountered asterisk (*) when refering the printf() function. I met with it long long ago, but what it is has gone away from my mind absolutely…What the man said about the asterisk (*) is as the follows:
The format of printf() is like this
%[flags][fldwidth][precision][lenmodifier]convtype
Format of the format string
The format string is a character string, beginning and ending in its initial shift state, if any. The format st
………
系统环境:CentOS5操作系统。主机VPNSRV01是我的VPN Server。主机VPNCLNT00是我的测试VPN Client。
Yum 安装 OpenVPN
=========================================================
[root@VPNSRV01]# yum install openvpn*
Dependencies Resolved
=============================================================================
Package Arch Version  ………
When we described the creation of a new file using either open or creat, we never said what values were assigned to the user ID and group ID of the new file. We’ll see how to create a new directory when we describe the mkdir function. The rules for the ownership of a new directory are identical to the rules in this section for the ownership of a new file.
The user ID of a new file is set to the effective user ID of the process. POSIX.1 allows an implementation to choose one of the following opt
………
最近做了些备份工作,实话说,rsync很好用~ 这里把常用的 scp 和 rsync 的用法一起介绍下
scp的备份:
需求:异地主机建立安全的信任关系,用scp自动完成异地文件的定时copy
1、在A机器上用root运行ssh-keygen,将生成/
2、在A机器上运行scp /root/.ssh/identity.pub test@192.168.1.10:/upload/.ssh/authorized_keys(假设B机器的IP地址为192.168.1.10,B机器上开了用户test,要上传到的目录是/upload,需输入密码)。目的是将本地的identity.pub放到远程机器上并改名为authorized_keys,这样就建立了新任主机,以后就不需要每次ssh都需要输入密码了;
3、通过crontab建立脚本,例:30 02 * * 1-5 scp /home/data/*
………


