网络断线检测中用到的popen
网络断线检测中用到的popen[@more@]/** * @fn netPing * @brief 获取Ping状态 * @param[in] * @param[out] * @return 0: down, 1: up */int netPing(void){ int i = 0; int ret = APP_FAIL; uint networkByteOrder; char buf[MAX_CMD_LEN] = {0}; char strbuf[100] = {0}; FILE *fd = NULL; networkByteOrder = htonl(pSetupSetPing->detectIpAddr); sprintf(strbuf, "/usr/local/sbin/ping -c 4 -t 1 %s", inet_ntoa(*(struct in_addr*)(&networkByteOrder)))
Ethereal使用入门
Ethereal使用入门[@more@]导读: 1、下载安装winpcap 2、下载安装ethereal 说明:新版本ethereal已经整合winpcap,下载ethereal即可完成安装。 二、使用 启动ethereal以后,选择菜单Capature->Start,就OK了。当你不想抓的时候,按一下stop, 抓的包就会显示在面板中,并且已经分析好了。 下面是一个截图: 1、ethereal使用-capture选项 nterface:指定在哪个接口(网卡)上抓包。一般情况下都是单网卡,所以使用缺省的就可以了。 Limit each packet:限制每个包的
tcpdump的本机安装和使用
tcpdump的本机安装和使用[@more@]对于网络管理人员来说,使用嗅探器能够随时掌控网络 的实际情况,在网络性能急剧下降的时候,能够通过嗅探器来分析原因,找出造成网络阻塞的根源。Tcpdump就是Linux平台下一个以命令行方式运行的 网络流量监测工具。他能截获网卡上收到的数据包,并能够协助网络管理员对其中的内容进行相应的分析。 嗅探器能够截获指定接口或任何接 口的数据包,这取决于如何对嗅探器进行配置。缺省情况下嗅探器一般会显示任何从网络上截获的数据包,但通常会因为数据量过大而使网络管理员理不清头绪。因 此,嗅探器一般都
SVN使用和SVN常用命令
SVN使用和SVN常用命令[@more@]一、创建 svn客栈去到svn做事的根目次,(这个目次是在启动svn做事的时间指定的,启动的下令如:svnserve -d -r /usr/local/svnrepos)推行 创建 客栈下令:svnadmin create new_project如许在/usr/local/svnrepos/ 内里就多了一个new_project目次出来,进入new_project/conf/ 目次 vi svnserve.conf将下面几行的解释去掉[general]anon-access = read #匿名的用户可读auth_access = write #有授权的用户可写password-db = passwd #表示svn用户的授权原料生涯在passwd文件内里 在conf/目次内里 vi passwd,添加
linux 用户管理
id:0为root,1-499为系统用户,500-60000为普通用户[@more@]在linux中系统中,它并不认识帐号名称。它认识的是我们的帐号ID,帐号ID保存在/etc/passwd文件中。我们在登录linux主机时,在输入完帐号和密码时,linux会先查找/etc/passwd文件中是否有这个帐号,如果没有则跳出,如果有的话,他会读取该帐号的user ID和group ID同时该帐号的根目录和shell也读了出来。然后在去核对密码表,在/etc/shadow中找出我们刚刚输入的帐号和userID,核对我们输入密码是否正确。一切正确我们可以登录到当前用户shell。1./etc/passwd我们首先看第一行root
linux 杂命令汇总
mii-tool:测试网卡是否插网线[@more@]grub-md5-crypt (用grub-md5-crypt成生md5密码的方法)su 切换用户但不进入该用户的宿主目录su - 切换用户,且进入该用户的宿主目录一个文件是否可以删除,取决于它的上层目录lsattr -d /etc 查看文件附加属性chattr a 追加 i 文件不能更改> file 清空文件内容(在shell提示符下操作)
vim 命令 快捷键以及相关总结
shift + 6:行首shift + 4:行尾[@more@]d + $:从当前位置删到行尾d + ^:从当前位置删到行首yw:复制一单词dw:删除一单词b:向前按字母移动光标w:向后按字母移动光标HLJK:左右下上5J:向下移动5个字符G:尾行gg:首行50G:50行ctrl + f:向前翻ctrl + b:向后翻ctrl + d:向后翻半页x:向后删除一字符X:向前删除一字符o:下一行插入O:上一行插入a:当前字符后插入A:尾行插入i:当前插入I:行首插入e!:重新读入文件%s/a/b/gc:%为所有行 g表该行的全局 c表交互方式:g/^$/d <=> :g/^s*$/d 去空行(去不掉有空格的空行):g/^
linux 下man的帮助命令
man1:用户命令[@more@]man1:用户命令man2:系统调用man3:库调用man4:特殊文件man5:配置文件服务man6:游戏man7:杂项man8:管理命令man9:内核参考man -f + 命令/文件 查看命令/文件在不同man版本中的参数情况
初学者学linux分区
初学者学linux分区[@more@]/BOOT 分区 100M 足矣/SWAP 分区 一般为你机器内存的2倍/ 根分区剩下的都给根分区
Diary English Record No.14
What do you feel is your strongest personality trait.你认为你最显著的个性特点是什么[@more@]evil person邪恶的人disguest 嫌恶,厌恶personal profile个人资料good job doing sth.干sth不错。ozone layer 臭氧层what kinds of things do you recycle?什么东西可循环利用?coexist 共存appreciate 欣赏we appreciate your helping us.感谢你的帮助。environmental protection环境保护over-population 人口过剩Mandarin Album 国语专辑he could fight very well with sword.他用刀打仗很厉害he was very good with a quarterstaff.他擅
Diary English Record No.13
To compare with that, our pay is worthwhile.相比之下,我们的付出是值得的。[@more@]establish a settlement.定居,建立一个部落complicate 使复杂化,使恶化Don't complicate a simple matter.不要把简单问题复杂化。It is suggested that ...建议...Our memory of the past might have been cleaned up.过去的记忆可能被清掉。make us feel better about ...让我们对...感觉更好。It's great to have a holiday.度假很爽。take the time to get together with your family.和你家在一起的时间多花点。make a massive mistakes.犯大错
Diary English Record No.9
right away 立刻,马上[@more@]enemy 敌人 rival 对手strong point 优点week point 缺点Good lord! 主啊,天啊,老天爷啊!lord of the soil 地主one beautiful June day 一个美丽的六月一天cap 帽子bowman 弓箭手draw the sword 拔刀outlaw 逃犯,罪犯company structure 公司架构be responsible for ... 对...负责He is responsible for this project他负责这个项目in charge of 负责,处理deal with 处理export sales manager has the sale staff under
Diary English Record No.8
personal item 个人用品 [@more@]Which street runs east-west?哪个路是东西走向的?have an affair有外遇It pays to tell the truth.讲实话是值得的It pays to suffer for your ideal.为自己的理想吃苦是值得的be jealous of ...嫉妒 ...envy your good luck我羡慕你的好运气accent 口音material [adj]重要的,物质的 [n]材料love at the first sight一见钟情emergency [n]紧急情况 [adj]紧急的emergency room 急诊室in an emergency/in case of emergency 在紧急关头parking lot停车场The circle is inside the trigleThe trigle and th
Diary English Record No.7
mega city 超级大城市,大城市[@more@]learn sth by memory 背诵observe 观察,遵守,庆祝to observe people around观察周围的人Do you observe Christmas in that city?在那个国家你过过圣诞节么We must observe silence in the classroom.保持肃静obey the law遵守法律the food cause me to be sickbring about (a big problem)造成...问题surf the internet上网inspector 检察员decorate 装饰freshman 大一sophomore 大二junior 大三senior 大四the park is on the northwest corner of high street and the first Avenue.The universi
Diary English Record No.6
conditions must be right for us.[@more@]previous to 在...以前It happened previous to his arrival there.事件发生在他到那以前。The witness disaffirmed his previous testimony.该证人否认他以前的证言I think it premature for us to discuss the question of agency.我认为商谈独家代理问题的时机还不成熟。premature 早产的,不成熟的,早熟的apply 申请,适用于,应用We apply the consumer protection plan, so that you buy at ease.本站申请参加消费者保护计划,让您买的放心at ease 放松,减轻,缓和apply for the job申请
Diary English Record No.5
recover 恢复 [@more@]appetite 食欲,胃口have no appetite 没有食欲get up one's appetite 做刺激胃口的事,增进食欲appetite for future knowledge 求知欲望thirst for knowledge 求知欲望recover from 恢复It will be a long time before he recovers from his present troubes.要是他从目前困境中恢复过来需很长时间mentality 心态,智力,精神头have strong mentality 心里素质过硬hesitate 犹豫If you love me, why you hesitate for it 如果你爱我,何必对爱犹豫不决Don't hesitate to speak to me when you have any difficultie
Diary English Record No.4
be out of patience with ... have no patience with ...对...不能再忍受,受不了 [@more@]lose all one's patience with ...对...发脾气My patience!啊!天啊!patience is a plaster for all sores.忍耐可以减轻一切痛苦plaster 膏药sores 痛处patience is the best remedy for every trouble.坚忍是对付一切烦恼的最好药方sour [adj]酸的,发酵的,[vt] 变坏be sour on讨厌,厌恶go sour/turn sour变酸,发酵Relations between the two countries have soured.这两个国家之间的关系变得恶化了Her temper has soured after giving birth
Diary English Record No.3
write for reservations写信去预定座位 [@more@]that fried chicken is mouth-watering这只烤鸡好吃的让人流口水extensive 广阔的I have extensive writing and editing experience我有非常丰富的写作和编辑经验seafood 海产品 fastfood 速食 vegetarian food 斋饭,素食mysteries 神秘的事物,难以理解的事情unfortunately, no one has ever detected dark matter directly, and its nature is still one of the biggest mysteries in science.可惜,至今还没有人能够直接侦测到黑暗物质,它的性质仍是科学中最神秘的事物之一nature 自然
Diary English Record No.2
She has a baby in her arms .她抱着孩子。It was hard for sb. to say anything .太困难让某人说话The cook was making a great noise with the cooking things .厨师用厨具制造很大的噪音The cat has a grin from ear to ear on its face .猫微笑。in fact 事实上。[@more@]you don't know much .你不知道的东西太多了。I must think of somthing new to speak about.我必须想些新的东西去说。you can have the baby for a time if you like.如果你喜欢,能抱孩子一会么。the nose was changing and becoming more like the pig nose.鼻
Diary English Record No.1
I am sitting on the grass 我坐在草坪上。I have nothing to do/read/think我什么也做、读、想。what a good book without pictures!没有图片是什么好书啊!I wander what to do .我在想去做什么。I said to my self .我对自己说。[@more@]I don't wander about it .我不想这件事。I didn't wander very much , even when the rabbit said to itself .甚至当兔子对自己说话,我什么也不想。take sth out of its pocket and look at it .把东西从兜里掏出来并且看它。go into the hole.钻进洞里。she didn't stop wandering how she could