linux 知识点 随笔

2011/4/21  

  •   如何查看系统内存的使用情况?今天百度实习二面,可是自己不争气没把握住这次机会,估计已经挂了。linux正在学,但简历上写成了精通,被面试的GG鄙视了一 通。要知耻而后勇,加油在网上找到了答案,就是使用free -m命令。

      $ free -m

             total       used       free     shared    buffers     cached
    Mem: 1002 769 232 0 62 421
    -/+ buffers/cache: 286 715
    Swap: 1153 0 1153
  其中,total指系统总内存;used指已使用内存,包括了作为buffers和cached的部分,即used=buffers+cached+(-buffers/cache);
  free指扣除已使用的内存;buffers和cached指用于inode和磁盘块的缓冲大小;
  -buffers/cache指扣除缓存后被应用程序吃掉的内存,+buffers/cache指加上缓存能够使用的内存大小
  • 使用df可以查看当前挂载的文件系统的使用情况,如剩余容量、block大小、inode使用情况(df -i)
2011/5/5
2011/4/22
  • 使用dumpe2fs可以查看相应分区文件系统的情况,如superblock、各block group的 inodes、blocks情况。
  • df/dumpe2fs/fdisk区别?

2011/5/5

  • 未umount文件系统而进行fsck出现无法启动

  任何系统对于未卸载的文件系统进行fsck都会出现问题的,主要是因为当前cache中还有未写入硬盘,未sync。解决办法很简单,只要umount  出错的文件系统,然后进行手动ck就好了。fsck -y /sdaX

2011/6/50

  1.  "UNPROTECTED PRIVATE KEY FILE ssh key ubuntu" 今天putty突然连不上openssh了.试过很多方法都没有搞好,重装也不行。

     后来才搞明白,原来之前把/root的权限改动了,而openssh需要/etc/ssh,~/.ssh/的权限不能过高。所以更改其权限即可。

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0744 for '/home/geek/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/geek/.ssh/id_rsa
To fix this, you'll need to reset the permissions back to default:
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
If you are getting another error:
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/geek/.ssh/known_hosts).
This means that the permissions on that file are also set incorrectly, and can be adjusted with this:
sudo chmod 644 ~/.ssh/known_hosts
Finally, you may need to adjust the directory permissions as well:
sudo chmod 755 ~/.ssh
This should get you back up and running.
转自 http://hi.baidu.com/goglad/blog/item/a8bc3d2a8f93c8345243c1ac.html

  

转载于:https://www.cnblogs.com/xiaozhutc/archive/2011/04/21/2023673.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值