文件系统 可不可以禁用 updatedb.mlocate?

分享于 

3分钟阅读

ubuntu

  繁體

问题

top


top - 05:16:52 up 1 day, 5:15, 3 users, load average: 2.00, 2.01, 1.83


Tasks: 83 total, 1 running, 82 sleeping, 0 stopped, 0 zombie


Cpu(s): 0.4%us, 0.8%sy, 0.0%ni, 8.4%id, 90.2%wa, 0.0%hi, 0.0%si, 0.2%st


Mem: 1737420k total, 1722680k used, 14740k free, 1241260k buffers


Swap: 917500k total, 160k used, 917340k free, 165448k cached



 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND


22901 davidpar 20 0 1051m 56m 4992 S 3 3.3 0:47.84 java


 2221 root 20 0 32348 26m 268 D 1 1.6 27:57.86 updatedb.mlocat


 25 root 20 0 0 0 0 S 0 0.0 10:10.77 kswapd0


 678 root 20 0 15864 444 268 S 0 0.0 0:19.45 irqbalance


 849 davidpar 20 0 26560 1676 332 S 0 0.1 17:17.49 screen



iotop


Total DISK READ: 4.07 M/s | Total DISK WRITE: 789.62 K/s


 TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND


 2221 idle root 1556.98 K/s 6.36 K/s 0.00 % 99.61 % updatedb.mlocate


22902 be/4 davidpar 2.54 M/s 671.93 K/s 0.00 % 96.96 % java -cp /home/davidparks21/fruggutils/lib/FruggMapreduceJobs.~educe.UnpackImages /mnt/local/imagebinaries-r-00010 /mnt/ebs1/


 547 be/3 root 0.00 B/s 87.47 K/s 0.00 % 0.30 % [jbd2/xvdf-8]


 177 be/3 root 0.00 B/s 3.98 K/s 0.00 % 0.15 % [jbd2/xvda1-8]




答案1

它可以被杀死:


sudo killall updatedb.mlocate



或者:


sudo kill -9 <PID>



每天运行cron,禁用它:


sudo chmod -x /etc/cron.daily/mlocate



如果你想重新启用它:


sudo chmod +x /etc/cron.daily/mlocate




答案2


sudo chmod -x /etc/cron.daily/mlocate


sudo cp /etc/cron.daily/mlocate /etc/cron.weekly/mlocate


sudo chmod +x /etc/cron.weekly/mlocate



第一个禁用cron作业,第二步将它移动到每周任务,第三个命令设置权限以便启用,每日,每小时,每周和每月都是选项。



文件  files  Updated  
相关文章