{"id":118843,"date":"2018-09-10T08:08:46","date_gmt":"2018-09-10T00:08:46","guid":{"rendered":"https:\/\/gulass.cn\/?p=118843"},"modified":"2018-09-04T09:52:48","modified_gmt":"2018-09-04T01:52:48","slug":"linux-cachefilesd-log","status":"publish","type":"post","link":"https:\/\/gulass.cn\/linux-cachefilesd-log.html","title":{"rendered":"\u5982\u4f55\u5728Linux 6\u4e2d\u89e3\u51b3Cachefilesd\u670d\u52a1\u8fc7\u91cf\u65e5\u5fd7"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6211\u4eec\u5728\u5b9e\u9645\u8fd0\u7ef4\u73af\u5883\u4e2d\uff0c\u5bf9\u64cd\u4f5c\u7cfb\u7edfOS\u7684\u7ef4\u62a4\u662f\u5fc5\u987b\u8fdb\u884c\u7684\u3002\u5e94\u7528\u7cfb\u7edf\u662f\u4e00\u4e2a\u6574\u4f53\uff0c\u7edd\u5bf9\u4e0d\u4ec5\u4ec5\u5305\u62ec\u5e94\u7528\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u672c\u8eab\u548c\u6570\u636e\u5e93\u670d\u52a1\u5668\uff0c\u8fd8\u5305\u62ec\u64cd\u4f5c\u7cfb\u7edf\u3001\u7f51\u7edc\u3001\u5b58\u50a8\u751a\u81f3\u786c\u4ef6\u65b9\u9762\u3002\u5bf9\u5e94\u7528\u7cfb\u7edf\u6574\u4f53\u7684\u76d1\u63a7\u4fdd\u969c\uff0c\u624d\u80fd\u5e26\u6765\u6700\u7a33\u5b9a\u7684\u8fd0\u884c\u6027\u80fd\u3002\u7edd\u5927\u591a\u6570\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u73af\u5883\u4e2d\u7684\u64cd\u4f5c\u7cfb\u7edf\u90fd\u662f\u53ef\u4ee5\u6301\u7eed\u8fd0\u884c\u7684\uff0c\u4e0d\u4f1a\u5f15\u8d77\u5927\u7684\u95ee\u9898\u3002\u4e00\u65e6\u51fa\u73b0\u5f53\u673a\u3001\u670d\u52a1\u5668Hange\u4f4f\u7684\u60c5\u51b5\uff0c\u5c31\u53ef\u80fd\u5bfc\u81f4\u707e\u96be\u6027\u7684\u7ed3\u679c\u3002\u6240\u4ee5\uff0c\u4ea1\u7f8a\u8865\u7262\u4e0d\u5982\u9632\u5fae\u675c\u6e10\uff0c\u7ecf\u5e38\u6027\u7684\u67e5\u770b\u7cfb\u7edf\u8fd0\u884c\u60c5\u51b5\uff0c\u67e5\u770b\u78c1\u76d8\u7a7a\u95f4\u3001CPU\u4f7f\u7528\u7387\u548c\u5404\u79cd\u65e5\u5fd7\u4fe1\u606f\uff0c\u90fd\u53ef\u4ee5\u5c3d\u65e9\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u64cd\u4f5c\u7cfb\u7edf\u5c42\u9762\u95ee\u9898\u3002\u672c\u7bc7\u4ecb\u7ecd\u4e00\u4e2a\u7b80\u5355\u7684Linux\u8fdb\u7a0bBug\u89e3\u51b3\u95ee\u9898\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

1\u3001\u95ee\u9898\u4ecb\u7ecd<\/strong><\/div>\n

\n\u4e00\u4e2a\u63a5\u53d7\u7684\u65b0\u7cfb\u7edf\uff0c\u5e94\u7528\u670d\u52a1\u5668\u548c\u6570\u636e\u5e93\u670d\u52a1\u5668\u5747\u4e3aLinux 6\u7248\u672c\u3002\u7cfb\u7edf\u672c\u8eab\u67b6\u6784\u6bd4\u8f83\u7b80\u5355\uff0c\u800c\u4e14\u8fd0\u884c\u4e00\u5e74\u6765\u4e5f\u6ca1\u6709\u4ec0\u4e48\u4e25\u91cd\u6545\u969c\u53d1\u751f\u3002<\/p>\n

\r\n[root@TESTDB ~]# uname -r\r\n2.6.32-131.0.15.el6.x86_64\r\n[root@TESTDB ~]# cat \/etc\/RedHat-release\r\nRed Hat Enterprise Linux Server release 6.1 (Santiago)\r\n[root@TESTDB ~]# uptime\r\n11:28:14 up 66 days, 21:31, 1 user, load average: 0.50, 0.44, 0.37 <\/pre>\n

\u2013\u6709\u4f8b\u884c\u5173\u673a\u7ef4\u62a4
\nLinux\u73af\u5883\u4e2d\uff0c\u6700\u5e38\u89c1\u65e5\u5fd7\u4e3a\/var\/log\u76ee\u5f55\uff0c\u68c0\u67e5message\u662f\u6211\u4eec\u76f4\u63a5\u7684\u65e5\u5fd7\u68c0\u67e5\u7b56\u7565\u3002<\/p>\n

[root@TESTDB ~]# tail -n 10 \/var\/log\/messages\r\nMar 26 08:31:42 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:32:12 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:32:42 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:33:12 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:33:42 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:34:12 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:34:42 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:35:12 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:35:42 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:36:12 TESTDB cachefilesd[1591]: Scan complete<\/pre>\n

\u65e5\u5fd7\u91cf\u5f88\u5927\uff0c\u4ece\u6bcf\u5468\u81ea\u52a8\u5f52\u6863\u60c5\u51b5\u770b\uff0c\u65e5\u5fd7\u603b\u91cf\u5927\u5df2\u7ecf\u6301\u7eed\u6bd4\u8f83\u957f\u65f6\u95f4\u4e86\u3002<\/p>\n

[root@TESTDB ~]# cd \/var\/log\/\r\n[root@TESTDB log]# ls -l | grep message\r\n-rw-------. 1 root root 549637 Mar 26 08:55 messages\r\n-rw-------. 1 root root 1193545 Mar 2 03:31 messages-20140302\r\n-rw-------. 1 root root 1191893 Mar 9 03:16 messages-20140309\r\n-rw-------. 1 root root 1194902 Mar 16 03:27 messages-20140316\r\n-rw-------. 1 root root 1195079 Mar 23 03:39 messages-20140323<\/pre>\n

\u4ece\u65e5\u5fd7\u4e0a\u770b\uff0c\u670d\u52a1\u8fdb\u7a0bcachefilesd\u5728\u6bcf\u969430s\uff0c\u81ea\u52a8\u5199\u5165\u4e00\u6761\u8bb0\u5f55\u3002\u9664\u4e86\u65e5\u5fd7\u8fc7\u591a\u5197\u4f59\u6761\u76ee\u5916\uff0c\u6ca1\u6709\u5176\u4ed6\u95ee\u9898\u7206\u51fa\u3002
\nmessage\u4fe1\u606f\u672c\u8eab\u662f\u4e2d\u6027\u7684\uff0c\u901a\u77e5\u8c03\u9519\u7c7b\u4fe1\u606f\u3002\u8fc7\u4e8e\u9891\u7e41\u7684\u6b63\u5e38\u4fe1\u606f\u5728\u5176\u4e2d\uff0c\u662f\u5bb9\u6613\u5c06\u9519\u8bef\u5185\u5bb9\u6df9\u6ca1\u5176\u4e2d\u7684\u3002\u6240\u4ee5\u671f\u671b\u8fd8\u662f\u53ef\u4ee5\u52a0\u4ee5\u89e3\u51b3\u3002\n<\/p>\n

2\u3001\u6545\u969c\u5206\u6790<\/strong><\/div>\n

\u6211\u4eec\u9047\u5230\u7684\u6545\u969c\u9519\u8bef\u662f\u5206\u79cd\u7c7b\u7684\u3002\u4e00\u4e2a\u6781\u7aef\u662f\u7d27\u6025\u4e25\u91cd\uff0c\u6bd4\u5982\u64cd\u4f5c\u7cfb\u7edf\u5b95\u673a\u3001hang\u4f4f\u65e0\u54cd\u5e94\uff0c\u76f4\u63a5\u5f71\u54cd\u4e1a\u52a1\u8fd0\u884c\uff0c\u751a\u81f3\u6570\u636e\u4e22\u5931\u3002\u53e6\u4e00\u4e2a\u6781\u7aef\u5c31\u662f\u4e00\u4e9b\u77ed\u671f\u4e0d\u4f1a\u5f15\u8d77\u5927\u95ee\u9898\u7684\u201c\u5c0f\u6545\u969c\u201d\u3002\u7d27\u6025\u4e25\u91cd\u9519\u8bef\u8003\u9a8c\u7684\u662f\u8fd0\u7ef4\u4eba\u5458\u7684\u77e5\u8bc6\u3001\u7ecf\u9a8c\u548c\u5fc3\u7406\u7d20\u8d28\uff0c\u800c\u5c0f\u6545\u969c\u8003\u9a8c\u7684\u804c\u4e1a\u7cbe\u795e\u548c\u4e13\u4e1a\u7d20\u8d28\u3002\u5bf9\u4e8e\u8fd9\u4e2a\u95ee\u9898\uff0c\u7b14\u8005\u4e5f\u6ca1\u6709\u4ec0\u4e48\u5f88\u597d\u5730\u601d\u8def\uff0c\u53ea\u6709\u6c42\u52a9\u5b98\u65b9\u8d44\u6599\u5e93\u3002\u5728Red Hat\u5b98\u7f51\u7684\u5ba2\u6237\u8ba2\u9605\u4e2d\uff0c\u7b14\u8005\u627e\u5230\u4e86\u6587\u7ae0\u300aWhy server is flodded with `cachefilesd Scan complete` messages?\u300b\u5176\u4e2d\u63cf\u8ff0\u4e86\u76f8\u540c\u7684\u95ee\u9898\u3002Cachefilesd\u8fdb\u7a0b\u662f\u8d1f\u8d23\u8fdb\u884c\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u7f13\u5b58\u7ba1\u7406\u7684\uff0c\u6bd4\u5982AFS\u548cNFS\u8fd9\u7c7b\u7f51\u7edc\u6587\u4ef6\u7cfb\u7edf\uff0c\u9700\u8981\u5728\u672c\u5730\u7cfb\u7edf\u4e2d\u5b58\u5728\u4e00\u4e2aCache\u5bf9\u8c61\u3002\u8fd9\u4e2a\u95ee\u9898\u662f\u7531\u4e8ecachefilesd\u670d\u52a1\u81ea\u8eab\u7684bug\u9020\u6210\u7684\uff0c\u7531\u4e8e\u5185\u90e8\u8bbe\u7f6e\u4e86\u9519\u8bef\u7684\u65e5\u5fd7\u7ea7\u522b\uff08log level\uff09\u3002\u6240\u4ee5\u6bcf\u6b21cachefilesd\u5728\u5de5\u4f5c\u8fdb\u884cScan\u7684\u65f6\u5019\uff0c\u90fd\u4f1a\u5199\u5165\u5230\/var\/log\/messages\u65e5\u5fd7\u6587\u4ef6\u91cc\u9762\u3002\u8fd9\u4e2a\u95ee\u9898\u5df2\u7ecf\u88abRed Hat\u5217\u5165\u4e3aBug\uff0c\u7f16\u53f7\u4e3a680127\u3002cachefilesd\u662f\u4f5c\u4e3a\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e00\u4e2a\u540e\u53f0\u670d\u52a1\u8fdb\u884c\u5de5\u4f5c\u7684\u3002\u5f53'\/var\/cache\/fscache\/cache'\u4e3a\u7a7a\u7684\u7684\u65f6\u5019\uff0c\u5c31\u4f1a\u81ea\u52a8\u5c06Scan Completed\u4fe1\u606f\u5199\u5165\u5230\u65e5\u5fd7\u4e2d\u3002\u6839\u636e\u9891\u7387\uff0c\u6bcf\u5206\u949f\u4f1a\u8fdb\u884c\u4e24\u6761\u65e5\u5fd7\u7684\u5199\u5165\u3002\u8fd9\u4e2a\u548c\u6211\u4eec\u5b9e\u9645\u7cfb\u7edf\u7684\u60c5\u51b5\u76f8\u7b26\u5408\u3002
\n\u7248\u672c\u662fLinux 6\uff0ccachefilesd\u5305\u7248\u672c\u4e3a0.10.1-2\u3002\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7248\u672c\u60c5\u51b5\u3002<\/p>\n

[root@TESTDB ~]# rpm -qa | grep cachefilesd\r\ncachefilesd-0.10.1-2.el6.x86_64<\/pre>\n

\u4fee\u590d\u65b9\u6cd5\u662f\u5c06cachefilesd\u7248\u672c\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\uff0c\u5c31\u53ef\u4ee5\u907f\u514d\u95ee\u9898\u51fa\u73b0\u3002<\/p>\n

3\u3001\u95ee\u9898\u89e3\u51b3<\/strong><\/div>\n

\u5b9a\u4f4d\u5230\u4e86\u95ee\u9898\uff0c\u89e3\u51b3\u7b56\u7565\u5c31\u662f\u5347\u7ea7cachefilesd\u5305\u3002\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0a\u641c\u7d22\u4e13\u95e8\u7684rpm\u5305\u4e0b\u8f7d\uff0c\u76ee\u5f55\u5982\u4e0b\uff1a
\n\u4e0b\u8f7d\u6700\u65b0\u7684\u7248\u672c0.10.2.1\u3002\u4f7f\u7528rpm\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n

[root@TESTDB ~]# cd \/\r\n[root@TESTDB \/]# mkdir updates\r\n[root@TESTDB \/]# cd updates\r\n[root@TESTDB updates]# ls -l\r\ntotal 36\r\n-rw-r--r--. 1 root root 35332 Mar 26 08:52 cachefilesd-0.10.2-1.el6.x86_64.rpm<\/pre>\n

\u53c2\u6570-Uvh\u4f1a\u53bb\u81ea\u5df1\u5224\u65ad\u5f53\u524d\u7248\u672c\u60c5\u51b5\uff0c\u5982\u679c\u662f\u6ca1\u6709\u5bf9\u5e94\u7a0b\u5e8f\u5c31\u76f4\u63a5\u5b89\u88c5\uff0c\u5426\u5219\u5c31\u8fdb\u5165\u5347\u7ea7\u6a21\u5f0f\u3002<\/p>\n

[root@TESTDB updates]# rpm -Uvh cachefilesd-0.10.2-1.el6.x86_64.rpm\r\nwarning: cachefilesd-0.10.2-1.el6.x86_64.rpm: Header V3 RSA\/SHA256 Signature, key ID fd431d51: NOKEYPreparing... ########################################### [100%]\r\n1:cachefilesd ########################################### [100%]<\/pre>\n

\u6700\u540e\u68c0\u67e5\u6548\u679c\uff0c\u65e5\u5fd7\u4e2d\u5305\u62ec\u4e86cachefilesd\u670d\u52a1\u7ec8\u6b62\u91cd\u542f\u7684\u8fc7\u7a0b\u3002\u91cd\u542f\u4e4b\u540e\uff0c\u5c31\u518d\u6ca1\u6709\u65b0\u65e5\u5fd7\u9879\u76ee\u4ea7\u751f\u3002<\/p>\n

Mar 26 08:55:12 TESTDB cachefilesd[1591]: Scan complete\r\nMar 26 08:55:21 TESTDB cachefilesd[1591]: Daemon Terminated\r\nMar 26 08:55:21 TESTDB kernel: CacheFiles: File cache on sda3 unregistering\r\nMar 26 08:55:21 TESTDB kernel: FS-Cache: Withdrawing cache \"mycache\"\r\nMar 26 08:55:21 TESTDB cachefilesd[10518]: About to bind cache\r\nMar 26 08:55:21 TESTDB cachefilesd[10518]: Bound cache\r\nMar 26 08:55:21 TESTDB kernel: FS-Cache: Cache \"mycache\" added (type cachefiles)Mar 26 08:55:21 TESTDB kernel: CacheFiles: File cache on sda3 registered\r\nMar 26 08:55:21 TESTDB cachefilesd[10519]: Daemon Started<\/pre>\n

\u4f5c\u4e3a\u670d\u52a1\u7684cachefilesd\uff0c\u4e5f\u5de5\u4f5c\u6b63\u5e38\u3002<\/p>\n

[root@TESTDB ~]# service cachefilesd status\r\ncachefilesd (pid 10519) is running...\r\n[root@TESTDB ~]# chkconfig --list cachefilesd\r\ncachefilesd 0:off 1:off 2:on 3:on 4:on 5:on 6:off<\/pre>\n<\/p>\n
4\u3001\u7ed3\u8bba<\/strong><\/div>\n

\u5728\u5b9e\u9645\u8fd0\u7ef4\u73af\u5883\u4e2d\uff0c\u5404\u79cd\u6545\u969c\u90fd\u662f\u53ef\u80fd\u53d1\u751f\u7684\u3002\u800c\u4e14\u8bca\u65ad\u95ee\u9898\u3001\u89e3\u51b3\u95ee\u9898\u9700\u8981\u5f88\u591a\u7ecf\u9a8c\u7684\u79ef\u7d2f\u548c\u603b\u7ed3\u3002\u53ca\u65f6\u53d1\u73b0\u95ee\u9898\u3001\u9632\u5fae\u675c\u6e10\u662f\u4fdd\u969c\u7cfb\u7edf\u6301\u7eed\u5065\u5eb7\u8fd0\u884c\u7684\u6700\u597d\u4fdd\u969c\u3002\u201c\u6551\u706b\u961f\u5458\u201d\u4e0d\u5982\u201c\u8001\u9ec4\u725b\u201d\uff0c\u4e5f\u5c31\u662f\u8fd9\u4e2a\u9053\u7406\u3002<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/baijiahao.baidu.com\/s?id=1610209004753039415&wfr=spider&for=pc<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttps:\/\/gulass.cn\/linux-cachefilesd-log.html<\/a>\u7f16\u8f91\uff1a\u5f20@\u5b87\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \u6211\u4eec\u5728\u5b9e\u9645\u8fd0\u7ef4\u73af\u5883\u4e2d\uff0c\u5bf9\u64cd\u4f5c\u7cfb\u7edfOS\u7684\u7ef4\u62a4\u662f\u5fc5\u987b\u8fdb\u884c\u7684\u3002\u5e94\u7528\u7cfb\u7edf\u662f\u4e00\u4e2a\u6574\u4f53\uff0c\u7edd\u5bf9\u4e0d\u4ec5\u4ec5\u5305\u62ec\u5e94\u7528\u670d\u52a1\u5668\u4e0a\u8fd0 […]<\/p>\n","protected":false},"author":310,"featured_media":119199,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-118843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/118843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/310"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=118843"}],"version-history":[{"count":11,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/118843\/revisions"}],"predecessor-version":[{"id":119357,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/118843\/revisions\/119357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/119199"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=118843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=118843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=118843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}