51CTO博客开发
Linux-proc原文:http://dqw19880428.blog.163.com/blog/static/2051131620093144735924/proc 文件系统 在Linux中有额外的机制可以为内核和内核模块将信息发送给进程 -- /proc 文件系统。最初设计的目的是允许更方便的对进程信息进行访问(因此得名),现在它被每一个有有趣的东西报
https://github.com/larrupingpig/vimgdb-for-vim7.3下载这两个vim-7.3.tar.bz2http://www.vim.org/sources.phpvimgdb-for-vim7.3 (this patch)https://github.com/larrupingpig/vimgdb-for-vim7.3tar xjvf vim-7.3.tar.b
用kill命令发送一个信号0去检测,别用ps -ef pid|grep,会有误判的存在!先决条件.进程id要写入pid文件,python做法def write_pidfile(pidfile): if os.path.isfile(pidfile): with open(pidfile, 'r') as f: &nbs
1.下载vim7.3,vimgdb7.3,ctags,glibc-2.9,taglist4.5,winmanager2.3----------------------------------------------------------------------------------------------vim7.3 -> http://www.vim.org/sources.phpvi
需求:我的www.cronhub.com域名需要指向到我租的服务器上,该服务器的80端口已经运行一个论坛的服务了。先敲入lsof -i :80,查看pid,确定apache装在哪COMMAND PID USER FD TYPE DEVICE SIZE NODE NAMEhttpd 2761 root &
[root@pachong yum-3.2.28]# yum search wwwLoaded plugins: fastestmirrorDetermining fastest mirrorsYumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. </html>/removing mirrorlis
先用ps得到进程pid号. 假定为51642种方法获取到他的父进程pid1. 使用/etc/proc文件夹[root@hadoop-node-15 p_w_picpath]# cat /proc/5164/stat5164(python) S15118 11378 34822 11448 4202560 1151 0 0 0 111 12 0 0 15 0 1 0 718512653 209346
注意update_time字段是datetime类型的SELECT update_time FROM v_videos WHERE update_time BETWEEN '2013-02-06 10:35:36' AND '2013-02-23 14:20:36'
1.杀死进程./mongod --shutdown--dbpath/opt/data/mongokilling process with pid: 44302.mongo的分片启动简介比如在三台机器上依次使用下面的命令启动:./mongod --fork --shardsvr --port 27018 --replSet shard2 --dbpath /opt/data/shard2 --log
系统是centos5搜了一下,要装curl的,可是俺已经装了啊?卸载git,再装,再试,无意中发现一个提示,没有权限执行 git-remote-https,啊哈?找到这个文件所在目录 /usr/libexec/git-core,加入到PATH里头,搞定!
1.获取某个属性最大的value值并自增范例因为mongo不支持类似select max操作,也不支持递增int的操作,所以采用目前的方案#找到符合table_name的记录,find输出时只输出type_id,按照type_id递减排序,取到第一个max_obj =stmt.find({"table_name":table_name},{"type_id":1}).sort("type_id",
由于ubuntu中在root权限下调用visudo使用的是nano这个编辑器这里的^O就表示ctrl+o,保存
我想find到mongo中的synonym_titles下面的嵌套子json下的影片名字段或者real_titles下面的嵌套子json下的影片名字段:但是1,2这个info信息字段不确定所以我想这么查询:db.search_correct_synonym.find({"synonym_titles.*":"联邦调查局"})但是失败了,这种查询是告诉mongo,我想找到无论哪一个field,只要包
db.user_profile.find({ $where: "this.disk_rack.length > 1" } )但是这种js引擎执行的会非常慢更好的办法是CreateextrafieldNamesArrayLength, update it with names array length and then use in queries:db.accommodations.find
1. 如果在编辑一个python代码文件中,想切换出来编辑另一个文件(编辑test1.py后切换出来编辑../test2.py)不用每次:wq出来在vim 另一个文件可以在当前vim中敲 :e ../test2.py现在打开了两个py文件(第一个切换前的在buffer缓冲区里)第二个py文件编辑完了,再切换回去,敲入:ls 查看当前缓冲区里有哪几个打开的py文件,然后 :b 数字号码,数字为:ls
部署三台机器的replica set,首先在三台机器都放置配置文件于/etc/mongo.conf:这个configuration file的描述见网页:http://docs.mongodb.org/manual/reference/configuration-options/然后启动./mongod --config /etc/mongo.conf接着敲入mongo 192.168.2.161
#!/bin/bashfunction usage(){ echo "Usage Example: ./install_start.sh -d /opt/modules/daemon -s 2012 -i 192.168.0.1 -p 8080" echo "-d install directory path"; &
find ~ -regex '.*log$' -exec rm -f {} \;注意最后加一个空格和\;{}代表当前找到的文件名
0. Run some SOMECOMMAND1. ctrl+z to stop (pause) the program and get back to the shell2. bg to run it in the background3. disown -h so that the process isn't killed when the terminal closes4. Type exi
使用iostat分析IO性能对于I/O-bond类型的进程,我们经常用iostat工具查看进程IO请求下发的数量、系统处理IO请求的耗时,进而分析进程与操作系统的交互过程中IO方面是否存在瓶颈。下面通过iostat命令使用实例,说明使用iostat查看IO请求下发情况、系统IO处理能力的方法,以及命令执行结果中各字段的含义。1.不加选项执行iostat我们先来看直接执行iostat的输出结果:li
for file in `ls`;dosed -e 's/#include <ncurses\//#include </g' $file> $file.bak;donefor file in `ls`;do mv ${file} ${file%%.bak*};done附录: 按指定的字符串截取${varible##*string} 从左向右截取最后一个string后的字符串${v
下载gcc最新版wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.1/gcc-4.8.1.tar.gz然后解压到文件夹cd /home/machen/cpp/gcc-4.8.1./contrib/download_prerequisitescd ..mkdir build_gcc_4.8.1cd build_gcc_4.8.1../gcc-4.8.1/configur
vmware虚拟机安装ubuntu的server版本后,安装ssh和ssh协议可以先用apt-cache search ssh这种方式查看一下apt-get install openssh-serverapt-get install ssh安装后可用dpkg -l|grep ssh安装用可以使用service ssh restart 这种方式重启ssh协议NAT结合DHCP方式(可以直接在本机没有
不必卸载原有版本gcc和g++1.升级gccapt-get install python-software-propertiessudo add-apt-repository ppa:ubuntu-toolchain-r/testsudo apt-get updatesudo apt-get install gcc-4.8sudo update-alternatives --install /us
需求:我有2个账号machen和hdfs由于我的home文件夹路径是machen账户下,但是调度系统以hdfs账户启动命令,该命令会在我的home文件夹里写log我先将我的home文件夹设置为775权限,同组用户也可读写 chmod 775 -R /home/machen添加machen_hdfs用户组/usr/sbin/groupaddmachen_hdfs查询machen和hdfs账户的uid
要求:将一个正在当前前台执行的进程转入后台执行,并且要求退出shell后依然保持不退出进程。ctrl+zto stop (pause) the program and get back to the shellbgto run it in the backgrounddisown -h [job-spec]where [job-spec] is the job number (like%1for
假设有文件内容如下,我想提取红笔部分{fileid:148909, lineno:1} : 日本 湘南 地区 夜里 海边 出现 校服 高中生 他们 开始 聊天 烟火 手机 纪念 他们 湘南 当地 名牌 高中 学生 目前 正值 紧迫 高中三年级 暑假 前夕 开始 投入 恐怖 考试 他们 迎接 自己 毕业 典礼 明天 开始 他们 高中生 考试 今天 集会 高中 生活 告别 仪式 第二 一早 打算 来到
mysql使用操作总结
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号