linux筆記

查看內存使用狀況:mongodb

free -hdocker

查看centos版本:centos

cat /etc/redhot-releasessh

查看機器64仍是32:
spa

uname -a
orm

看端口狀況:進程

netstat -nupl  (UDP類型的端口)內存

netstat -ntpl  (TCP類型的端口)it


查看當前目錄,深度1的大小:test

du -h --max-depth=1 work/testing

查看cpu信息:

lscpu


------------mongodb ----------------

1,啓動,

    1)不指定端口:

./mongod --auth --smallfiles --dbpath /root/docker-mount/mongodb --journal --logpath /root/docker-mount/mongodb/mongodb.log --fork

    2)制定端口:

./mongod --auth --smallfiles --dbpath /root/docker-mount/mongodb --journal --port $port --logpath /root/docker-mount/mongodb/mongodb.log --fork


生成ssh-key:ssh-keygen -t rsa


查看進程號啓動位置:ls -l /proc/${pid}

未完待續......

相關文章
相關標籤/搜索