只有这个途径
让他们给你临时调分区空间 或者提供服务器账户密码给他们 让他们处理(比如把分区0的数据移动到分区1)
又或者让加钱 让他们给你换一台磁盘分区大的
1. 登录很慢;
2. 有些命令会提示/var/run/或者/run/空间不足
# yum search maria
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Could not create lock at /var/run/yum.pid: [Errno 28] No space left on device: '/var/run/yum.pid'
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 50G 5.9G 41G 13% /
devtmpfs 488M 0 488M 0% /dev
tmpfs 497M 24K 497M 1% /dev/shm
tmpfs 497M 496M 1.2M 100% /run
tmpfs 497M 0 497M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user/0
...
4.0K /run/syslogd.pid
496M /run/systemd
4.0K /run/tmpfiles.d
...
...
4.0K /run/systemd/seats
495M /run/systemd/sessions
0 /run/systemd/show-status
...
1 10456 109120 113683 118244 122806 13407 17894 22459 27024 31587 36148 4071 45271 49833 54395 58957 63518 6808 72641 77202 81765 86326 90888 95449
100 104560 109121 113684 118245 122807 13408 17895 2246 27025 31588 36149 40710 45272 49834 54396 58958 63519 68080 72642 77203 81766 86327 90889 9545
1000 104561 109122 113685 118246 122808 13409 17896 22460 27026 31589 3615 40711 45273 49835 54397 58959 6352 68081 72643 77204 81767 86328 9089 95450
10000 104562 109123 113686 118247 122809 1341 17897 22461 27027 3159 36150 40712 45274 49836 54398 5896 63520 68082 72644 77205 81768 86329 90890 95451
100000 104563 109124 113687 118248 12281 13410 17898 22462 27028 31590 36151 40713 45275 49837 54399 58960 63521 68083 72645 77206 81769 8633 90891 95452
100001 104564 109125 113688 118249 122810 13411 17899 22463 27029 31591 36152 40714 45276 49838 544 58961 63522 68084 72646 77207 8177 86330 90892 95453
100002 104565 109126 113689 11825 122811 13412 179 22464 2703 31592 36153 40715 45277 49839 5440 58962 63523 68085 72647 77208 81770 86331 90893 95454
100003 104566 109127 11369 118250 122812 13413 1790 22465 27030 31593 36154 40716 45278 4984 54400 58963 63524 68086 72648 77209 81771 86332 90894 95455
100004 104567 109128 113690 118251 122813 13414 17900 22466 27031 31594 36155 40717 45279 49840 54401 58964 63525 68087 72649 7721 81772 86333 90895 95456
100005 104568 109129 113691 118252 122814 13415 17901 22467 27032 31595 36156 40718 4528 49841 54402 58965 63526 68088 7265 77210 81773 86334 90896 95457
100006 104569 10913 113692 118253 122815 13416 17902 22468 27033 31596 36157 40719 45280 49842 54403 58966 63527 68089 72650 77211 81774 86335 90897 95458
100007 10457 109130 113693 118254 122816 13417 17903 22469 27034 31597 36158 4072 45281 49843 54404 58967 63528 6809 72651 77212 81775 86336 90898 95459
100008 104570 109131 113694 118255 122817 13418 17904 2247 27035 31598 36159 40720 45282 49844 54405 58968 63529 68090 72652 77213 81776 86337 90899 9546
100009 104571 109132 113695 118256 122818 13419 17905 22470 27036 31599 3616 40721 45283 49845 54406 58969 6353 68091 72653 77214 81777 86338 909 95460
...
├─1 /usr/lib/systemd/systemd --system --deserialize 21
├─user.slice
│ └─user-0.slice
│ ├─session-228140.scope
│ │ ├─ 8822 sshd: root@pts/0
│ │ ├─ 8832 -bash
│ │ ├─10901 systemd-cgls
│ │ └─10902 systemd-cgls
│ ├─session-43.scope
...
│ ├─session-13.scope
│ │ ├─ 518 login -- root
│ │ └─4253 -bash
│ ├─session-2.scope
│ │ ├─ 1865 /usr/local/qcloud/stargate/sgagent -d
│ │ ├─ 4901 /usr/local/qcloud/YunJing/YDEyes/YDService
│ │ ├─ 4905 /usr/local/qcloud/YunJing/YDLive/YDLive
│ │ ├─10182 barad_agent
│ │ ├─10189 barad_agent
│ │ └─10190 barad_agent
│ └─session-1.scope
│ └─4537 /usr/bin/Xvnc :1 -auth /root/.Xauthority -desktop VM_0_6_centos:1 (root) -fp catalogue:/etc/X11/fontpath.d -geometry 1024x768 -pn -rfbauth /root/.vnc/passwd -rfbport 5901 -rf
└─system.slice
...
# This is private data. Do not parse.
UID=0
USER=root
ACTIVE=1
STATE=closing
REMOTE=0
STOPPING=1
TYPE=unspecified
CLASS=background
SCOPE=session-17893.scope
SERVICE=crond
POS=0
LEADER=13818
AUDIT=17893
REALTIME=1509751021778673
MONOTONIC=919291127922
# This is private data. Do not parse.
UID=0
USER=root
ACTIVE=1
STATE=closing
REMOTE=0
STOPPING=1
TYPE=unspecified
CLASS=background
SCOPE=session-10456.scope
SERVICE=crond
POS=0
LEADER=10537
AUDIT=10456
REALTIME=1509368761039002
MONOTONIC=537030388252
*/1 * * * * /usr/local/qcloud/stargate/admin/start.sh >/dev/null 2>&1 &
*/20 * * * * /usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null &
systemd-logind和crond的配合可能有bug,导致systemd-logind无法关闭session。
让sshd在15分钟后主动关闭session:
# vi /etc/ssh/sshd_config
...
ClientAliveInterval 300
...
让crontab的脚本只每天执行一次:
# crontab -l
0 2 * * * /usr/local/qcloud/stargate/admin/start.sh >/dev/null 2>&1 &
0 3 * * * /usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null &
重启systemd-logind服务:
# systemctl restart systemd-logind
不用修改crontab和sshd配置,直接关闭systemd-logind服务即可(一般虚机里面用虚机的可能性不大,所以systemd-logind开启的cgroup准备用处不大):
# systemctl stop systemd-logind
# systemctl disable systemd-logind
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)