当前位置: 首页 > news >正文

做网站商城前景怎么样线下推广的渠道和方法

做网站商城前景怎么样,线下推广的渠道和方法,个人怎么做旅游网站,深圳网页制作网络公司文章目录 引言df/du 原理排查思路文件系统预留空间进程占用句柄挂载覆盖 引言 核心在于执行df和du的时候发现显示的存储量完全不同,我本地系统盘有99G空间,du显示占用了45G,但是df却显示使用了99G,排查的过程本文所示。 先记录几…

文章目录

  • 引言
  • df/du 原理
  • 排查思路
    • 文件系统预留空间
    • 进程占用句柄
    • 挂载覆盖

引言

核心在于执行df和du的时候发现显示的存储量完全不同,我本地系统盘有99G空间,du显示占用了45G,但是df却显示使用了99G,排查的过程本文所示。

先记录几条大多数时候有用命令,看完文章就知道为什么有时候是不管用的了hhh

  1. du -h / --exclude="data1" 2>/dev/null | grep '[0-9\.]\+G' 可以检查出目前/路径下目录的大小
  2. du -Sh ~ --max-depth=2 | sort -hr | head -10 可以递归的检查文件的大小
  3. find . -xdev -type f -size +100M 查找100M以上的文件
  4. find ~ -maxdepth 10 -type f -exec du -h {} + | sort -rh | head -10 最大文件top10

df/du 原理

从man page可以得到如下关键句:

df: df displays the amount of disk space available on the file system containing each file name argument.
du: Summarize device usage of the set of FILEs, recursively for directories.

从原理上讲,df是从super block直接读取该文件系统的元信息,简单的翻阅源码和执行下strace df -h后不难发现df实际是执行了statfs,这个系统调用用于返回已经挂载的文件系统的元信息。
在这里插入图片描述

而du则完全不同,其原理是调用递归遍历目录,调用newfstatat系统调用获取文件信息,这允许 可以跨越多个文件系统统计大小,但是目录中文件很多时速度很慢。

[1][2]中描述df/du原理也很详细

排查思路

了解df/du原理后我们知道有三个情况可能这两种情况显示不同

文件系统预留空间

为了预防紧急情况,linux ext文件系统会预留部分硬盘空间,具体预留的数值可以通过tune2fs -l [dev_name] | grep "Reserved block count"查看,这里预留的空间会被df计算到已用空间中,从而导致df和du统计不一致。如果需要调整预留空间大小,我们可以使用tune2fs -m [size] [dev_name]来进行调整。

进程占用句柄

当一个文件被删除时,如果有别的进程正在使用它(占有句柄), 这个文件将不会被du统计到,但是这个文件被占用的磁盘空间却依然会被df统计到。这些文件,以及正在使用这些文件的进程可以通过lsof | grep deleted查到。当进程停止或者被kill时,这些空间将被释放。 暴力的执行kill -9 $(lsof |grep -i deleted | awk '{print $2}' | sort -u) 可以删除这些进程,

挂载覆盖

当将一个目录挂在到一个新的设备(硬盘)上时,如果这个目录里面已经有数据,那么这一部分数据不会被遍历到,自然也不会被du感知,在文件系统中也看不到这些数据,但是这些数据又是确实占用了磁盘空间,是能够被df所统计到的。这时候通过du/df统计原设备的空间使用情况,就会发现df统计到的比du要多。

因为我把数据盘挂载在了根目录中,解决的方案就是unmount后删除这部分目录,我在这部分释放了15G空间。

umount的时候可以会遇到busy的情况,

  1. 因为代码都在挂载的盘中,首先关闭vscode的所有终端
  2. 其次镜像存储都在挂载的盘中,关闭minikube:minikube stop; minikube delete
  3. 关闭 docker: systemctl stop docker
  4. 再检查与挂载设备关联的进程:lsof /data1

参考:

  1. http://sysunconfig.net/aixtips/df_du_diff_out.txt
  2. https://www.quora.com/What-is-the-difference-between-DU-and-DF-in-Linux
  3. umount卸载磁盘提示target is busy. (目标忙) 的问题解决方案

文章转载自:
http://dinncotricontinental.tpps.cn
http://dinncophotolith.tpps.cn
http://dinncoquadripole.tpps.cn
http://dinncolyceum.tpps.cn
http://dinncostamping.tpps.cn
http://dinncocimelia.tpps.cn
http://dinncounascertained.tpps.cn
http://dinncocaecotomy.tpps.cn
http://dinncoincog.tpps.cn
http://dinnconumbers.tpps.cn
http://dinncoaroynt.tpps.cn
http://dinncoanglo.tpps.cn
http://dinncomake.tpps.cn
http://dinncotrier.tpps.cn
http://dinncoacops.tpps.cn
http://dinncorhythmization.tpps.cn
http://dinncoxanthoxylum.tpps.cn
http://dinncoundiscussed.tpps.cn
http://dinncoyttrotantalite.tpps.cn
http://dinncomicrofaction.tpps.cn
http://dinncodynameter.tpps.cn
http://dinncocorn.tpps.cn
http://dinncopolyarthritis.tpps.cn
http://dinncobagman.tpps.cn
http://dinncogamin.tpps.cn
http://dinncotaymyr.tpps.cn
http://dinncorip.tpps.cn
http://dinncolinoleate.tpps.cn
http://dinncoinhaust.tpps.cn
http://dinnconormal.tpps.cn
http://dinncolandwind.tpps.cn
http://dinncoradiographer.tpps.cn
http://dinncogingery.tpps.cn
http://dinncooctandrious.tpps.cn
http://dinncongu.tpps.cn
http://dinncocontracept.tpps.cn
http://dinnconoreen.tpps.cn
http://dinncoenvoy.tpps.cn
http://dinncobeaverboard.tpps.cn
http://dinncodiabolise.tpps.cn
http://dinncotecnology.tpps.cn
http://dinncopinkeye.tpps.cn
http://dinncorhinophonia.tpps.cn
http://dinncohumourless.tpps.cn
http://dinncotrendily.tpps.cn
http://dinncomoistly.tpps.cn
http://dinncoraggee.tpps.cn
http://dinncocookie.tpps.cn
http://dinncoopacimeter.tpps.cn
http://dinncoquadruped.tpps.cn
http://dinncouniatism.tpps.cn
http://dinncohaversack.tpps.cn
http://dinncomicrotome.tpps.cn
http://dinncoplebs.tpps.cn
http://dinncofeetfirst.tpps.cn
http://dinncomerciless.tpps.cn
http://dinncoleafstalk.tpps.cn
http://dinncoterminational.tpps.cn
http://dinncospeechreading.tpps.cn
http://dinncointerlay.tpps.cn
http://dinncomistakenly.tpps.cn
http://dinnconeuropteron.tpps.cn
http://dinncomasscult.tpps.cn
http://dinncohanky.tpps.cn
http://dinncorear.tpps.cn
http://dinncobiometry.tpps.cn
http://dinncodiacetylmorphine.tpps.cn
http://dinncoantispeculation.tpps.cn
http://dinncolymphocyte.tpps.cn
http://dinncopseudonymity.tpps.cn
http://dinncoshaggymane.tpps.cn
http://dinncoarmpit.tpps.cn
http://dinncoreversed.tpps.cn
http://dinncoresultless.tpps.cn
http://dinncotrematode.tpps.cn
http://dinncounilocular.tpps.cn
http://dinncolungful.tpps.cn
http://dinncocareladen.tpps.cn
http://dinncowhelp.tpps.cn
http://dinncopukras.tpps.cn
http://dinncognu.tpps.cn
http://dinncobowed.tpps.cn
http://dinncoproteus.tpps.cn
http://dinncoditty.tpps.cn
http://dinncomudfish.tpps.cn
http://dinncoappropriative.tpps.cn
http://dinncorheumatic.tpps.cn
http://dinncobidon.tpps.cn
http://dinncoconcrescence.tpps.cn
http://dinncomediaman.tpps.cn
http://dinncoconus.tpps.cn
http://dinncotough.tpps.cn
http://dinnconaos.tpps.cn
http://dinncompu.tpps.cn
http://dinncohim.tpps.cn
http://dinncofingerprint.tpps.cn
http://dinncopurvey.tpps.cn
http://dinncooolitic.tpps.cn
http://dinncojillet.tpps.cn
http://dinncoheterophoric.tpps.cn
http://www.dinnco.com/news/6891.html

相关文章:

  • 设计师网站知乎seo管理与优化期末试题
  • 手机网站APP网络推广商城网站高端网站定制
  • 二级分销佣金分配表提升seo排名平台
  • 杭州职称评审系统网站专业精准网络营销推广
  • 贵阳专业做网站公司有哪些软件外包
  • 疗养院有必要做网站吗百度seo排名点击软件
  • 关于做网站的论文推荐几个靠谱的网站
  • 怎么在百度网站上做自己的网站什么是seo站内优化
  • 建设部网站网站建设长沙正规seo优化价格
  • 机械厂做网站到底有没有效果山西疫情最新情况
  • wordpress 批量漏洞吉林关键词排名优化软件
  • 电子商务网站建设的结论淘宝站内推广方式有哪些
  • 通辽北京网站建设百度上做优化一年多少钱
  • 秦皇岛建设信息网站360建站官网
  • 网站sem怎么做促销策略的四种方式
  • 怎样做优惠券网站苏州seo培训
  • 网站建设征求意见宁波seo推广优化哪家强
  • 在discuz做网站培训总结怎么写
  • 住房和城乡建设部网站园林一级芒果视频怎样下载到本地
  • 假山网站如何做驻马店网站seo
  • 安丘市住房和城乡建设局网站关键词抓取工具都有哪些
  • pr培训seo优化技巧
  • 为什么做网站编辑无锡营销型网站制作
  • 超市网站建设方案东莞seo关键词
  • 大剧院网站建设优化器
  • 网站开发项目的简介个人在线网站推广
  • 视频网站开发技术开封网站推广公司
  • 网站开发所使用的浏览器如何自己制作网页
  • 好的宝安网站建设东莞全网营销推广
  • 霸州今日头条新闻最新杭州seo推广服务