{"id":317,"date":"2018-06-19T17:36:10","date_gmt":"2018-06-19T17:36:10","guid":{"rendered":"http:\/\/dbtut.com\/?p=317"},"modified":"2021-02-09T13:37:12","modified_gmt":"2021-02-09T13:37:12","slug":"how-to-send-disk-usage-as-email-on-linux","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/","title":{"rendered":"shell script to check disk space and send email alerts"},"content":{"rendered":"<p>This article contain infromation about shell script to check disk space and send email alerts in linux. I wrote this article for regularly checking the disk usage rates of the PostgreSQL databases that I manage.<\/p>\n<p>You can use the script which I will share to send disk usages to yourself as email for linux systems.<\/p>\n<p>First, you should create a sh file in a directory on your system with the command below.<\/p>\n<pre class=\"lang:default decode:true \">vi diskusage.sh<\/pre>\n<p>Then, by pressing the insert from the keyboard, paster the following contents to the file.<\/p>\n<p>In the following script I have listed the parameters you need to change.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>yourdiskpart<\/td>\n<td>You should type the disk or mount name. For example \/sda1 or \/postgres<\/td>\n<\/tr>\n<tr>\n<td>x@xyz.com<\/td>\n<td>The email address you want to send the mail to.<\/td>\n<\/tr>\n<tr>\n<td>80<\/td>\n<td>When the Disk Usage Ratio exceeds 80%, it sends email.You can change this number according to your needs.<\/td>\n<\/tr>\n<tr>\n<td>y@xyz.com<\/td>\n<td>The email address you want to send the mail from.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre class=\"lang:default decode:true\">#!\/bin\/bash\r\nTHRESHOLD=80\r\nEMAIL=x@xyz.com\r\n#PART=yourdiskpart\r\nPART=\/boot\r\nUSE=`df -h |grep $PART | awk '{ print $5 }' | cut -d'%' -f1`\r\nif [ $USE -gt $THRESHOLD ]; then\r\n\u00a0 echo \"Percent Used: $USE\" | mail -s \"Disk Usage Rate \" -r y@xyz.com $EMAIL\r\nfi<\/pre>\n<p>We copy the above contents into the file &#8220;diskusage.sh&#8221; and then press Escape and exit with the <code>:wq<\/code> command.<\/p>\n<p>You must run the following command to grant execute to the file.<\/p>\n<pre class=\"lang:default decode:true \">chmod 700 diskusage.sh<\/pre>\n<p>We will then enter crontab with the command <code>crontab -e<\/code> and create a job that will run this script every morning at 09:00.<\/p>\n<p>You can access the details of crontab job creation in the article titled &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/18\/how-to-create-crontab-job-on-linux\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Create Crontab Job On Linux<\/a>&#8220;.<\/p>\n<p>After running <code>crontab -e<\/code>, we press the insert from the keyboard and paste the following content.<\/p>\n<p>With this line, we will indicate that the file &#8220;diskusage.sh&#8221; will work every day at 09:00 am.<\/p>\n<pre class=\"lang:default decode:true \">#disk usage ratio runs on 09:00 AM\r\n00 09 * * *\u00a0 sh \/xx\/diskusage.sh 2&gt;&amp;1<\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/811.png\" \/><\/p>\n<p>Every morning at 09:00, you will be notified by an email if the disk usage rate of the partition you specified in the diskusage.sh file is over 80%.<\/p>\n<p>If it can not send the email even if the disk usage rate exceeds 80%, it means that you have done something wrong. You can try to solve the problem by running diskusage.sh manually as follows.<\/p>\n<pre class=\"lang:default decode:true \">\/xx\/diskusage.sh<\/pre>\n<p>If there is a problem with sending mail in linux, you can find the problem by using the article named &#8220;<a href=\"http:\/\/dbtut.com\/index.php\/2018\/06\/14\/how-to-check-crontab-job-log-on-linux\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Check Crontab Job Log on Linux<\/a>&#8220;.<\/p>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_317\" class=\"pvc_stats all  \" data-element-id=\"317\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article contain infromation about shell script to check disk space and send email alerts in linux. I wrote this article for regularly checking the disk usage rates of the PostgreSQL databases that I manage. You can use the script which I will share to send disk usages to yourself as email for linux systems. &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_317\" class=\"pvc_stats all  \" data-element-id=\"317\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":14933,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[299],"tags":[207,8484,332,333,350,346,347,348,8475,8476,8478,8485,8486,8472,8488,349,8477,8487,331,8480,8479,8482,8481,8490,8473,8489,8474,8483],"class_list":["post-317","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-linux","tag-chmod","tag-create-script-to-check-disk-space-and-send-email-alerts","tag-crontab","tag-crontab-e","tag-df-h","tag-disk-usage","tag-disk-usage-alert","tag-disk-usage-on-linux","tag-linux-disk-usage-command","tag-linux-disk-usage-human-readable","tag-linux-script-to-check-disk-space-and-send-email","tag-linux-shell-script-to-monitor-disk-space-usage","tag-linux-shell-script-to-monitor-disk-space-usage-and-send-email","tag-linux-shell-script-to-monitor-disk-space-usage-with-email-alert","tag-linux-shell-script-to-monitor-space-usage-and-send-email","tag-mail-on-linux","tag-script-to-check-disk-space-linux","tag-send-an-email-alert-when-your-disk-space-gets-low","tag-sh","tag-shell-script-to-check-disk-space-and-send-email","tag-shell-script-to-check-disk-space-and-send-email-alerts","tag-shell-script-to-monitor-disk-space-and-send-an-email","tag-shell-script-to-monitor-disk-usage-and-send-email","tag-shell-script-to-send-an-alert-mail-if-disk-usage-exceeds","tag-shell-script-to-watch-the-disk-space","tag-simple-shell-script-to-monitoring-disk-space-on-a-linux","tag-unix-shell-script-to-check-disk-space","tag-write-a-shell-script-to-check-disk-space-and-send-an-email-alert"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>shell script to check disk space and send email alerts - Database Tutorials<\/title>\n<meta name=\"description\" content=\"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"shell script to check disk space and send email alerts - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-19T17:36:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-09T13:37:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png\" \/>\n\t<meta property=\"og:image:width\" content=\"536\" \/>\n\t<meta property=\"og:image:height\" content=\"333\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dbtut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dbtut\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\"},\"author\":{\"name\":\"dbtut\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\"},\"headline\":\"shell script to check disk space and send email alerts\",\"datePublished\":\"2018-06-19T17:36:10+00:00\",\"dateModified\":\"2021-02-09T13:37:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\"},\"wordCount\":364,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png\",\"keywords\":[\"chmod\",\"Create Script to Check Disk Space and Send Email Alerts\",\"crontab\",\"crontab -e\",\"df -h\",\"Disk Usage\",\"Disk Usage Alert\",\"Disk Usage On Linux\",\"linux disk usage command\",\"linux disk usage human readable\",\"linux script to check disk space and send email\",\"Linux Shell Script To Monitor Disk Space Usage\",\"Linux Shell Script To Monitor Disk Space Usage and send email\",\"linux shell script to monitor disk space usage with email alert\",\"Linux Shell Script To Monitor Space Usage and Send Email\",\"Mail On Linux\",\"script to check disk space linux\",\"Send an Email Alert When Your Disk Space Gets Low\",\"sh\",\"shell script to check disk space and send email\",\"shell script to check disk space and send email alerts\",\"shell script to monitor disk space and send an email\",\"shell script to monitor disk usage and send email\",\"shell script to send an alert mail if disk usage exceeds\",\"Shell script to watch the disk space\",\"Simple Shell Script to Monitoring Disk Space on a Linux\",\"unix shell script to check disk space\",\"write a shell script to check disk space and send an email alert\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\",\"name\":\"shell script to check disk space and send email alerts - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png\",\"datePublished\":\"2018-06-19T17:36:10+00:00\",\"dateModified\":\"2021-02-09T13:37:12+00:00\",\"description\":\"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png\",\"width\":536,\"height\":333},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"shell script to check disk space and send email alerts\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408\",\"name\":\"dbtut\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g\",\"caption\":\"dbtut\"},\"description\":\"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.\",\"sameAs\":[\"http:\/\/NurullahCAKIR\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dbtut\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"shell script to check disk space and send email alerts - Database Tutorials","description":"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/","og_locale":"en_US","og_type":"article","og_title":"shell script to check disk space and send email alerts - Database Tutorials","og_description":"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.","og_url":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/","og_site_name":"Database Tutorials","article_published_time":"2018-06-19T17:36:10+00:00","article_modified_time":"2021-02-09T13:37:12+00:00","og_image":[{"width":536,"height":333,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png","type":"image\/png"}],"author":"dbtut","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dbtut","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/"},"author":{"name":"dbtut","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408"},"headline":"shell script to check disk space and send email alerts","datePublished":"2018-06-19T17:36:10+00:00","dateModified":"2021-02-09T13:37:12+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/"},"wordCount":364,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png","keywords":["chmod","Create Script to Check Disk Space and Send Email Alerts","crontab","crontab -e","df -h","Disk Usage","Disk Usage Alert","Disk Usage On Linux","linux disk usage command","linux disk usage human readable","linux script to check disk space and send email","Linux Shell Script To Monitor Disk Space Usage","Linux Shell Script To Monitor Disk Space Usage and send email","linux shell script to monitor disk space usage with email alert","Linux Shell Script To Monitor Space Usage and Send Email","Mail On Linux","script to check disk space linux","Send an Email Alert When Your Disk Space Gets Low","sh","shell script to check disk space and send email","shell script to check disk space and send email alerts","shell script to monitor disk space and send an email","shell script to monitor disk usage and send email","shell script to send an alert mail if disk usage exceeds","Shell script to watch the disk space","Simple Shell Script to Monitoring Disk Space on a Linux","unix shell script to check disk space","write a shell script to check disk space and send an email alert"],"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/","url":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/","name":"shell script to check disk space and send email alerts - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png","datePublished":"2018-06-19T17:36:10+00:00","dateModified":"2021-02-09T13:37:12+00:00","description":"This article contain infromation about shell script to check disk space and send email alerts in linux. I used for monitoring PostgreSQL.","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/06\/Ads\u0131z-44.png","width":536,"height":333},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/06\/19\/how-to-send-disk-usage-as-email-on-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"shell script to check disk space and send email alerts"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/fc047c39e1e53dce28fc4253529ea408","name":"dbtut","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c322c32021bf651d9e103b183963c479a9c9791ead0715f4348203496c39aa54?s=96&d=mm&r=g","caption":"dbtut"},"description":"We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.","sameAs":["http:\/\/NurullahCAKIR"],"url":"https:\/\/dbtut.com\/index.php\/author\/dbtut\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/14933"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}