{"id":814,"date":"2017-12-14T11:39:51","date_gmt":"2017-12-14T11:39:51","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=814"},"modified":"2017-12-14T11:44:38","modified_gmt":"2017-12-14T11:44:38","slug":"website-speed","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/website-speed\/","title":{"rendered":"Website speed"},"content":{"rendered":"<p class=\"description_pui\">Bash plugin to measure the website response speed including the following metrics:<\/p>\n<p>&#8211; Time to First Byte<br \/>\n&#8211; Total load time<br \/>\n&#8211; Pre-transfer time<br \/>\n&#8211; Response HTTP code<br \/>\n&#8211; Page total size<\/p>\n<p>Author: Manuel Angel Fernandez<br \/>\nHis blog: <a href=\"http:\/\/rastreador.com.es\/\" target=\"_blank\" rel=\"noopener\">http:\/\/rastreador.com.es\/<\/a><\/p>\n<h2>Module data<\/h2>\n<p>#!\/bin\/bash\u00a0<br \/>\n# Page Speed Plugin Pandora FMS Server plugin\u00a0<br \/>\n# (c) Manuel Angel Fernandez 2012\u00a0<\/p>\n<pre> function help {\u00a0\r\necho -e \"Page Speed Plugin for Pandora FMS Plugin server. http:\/\/pandorafms.com\"\u00a0\r\necho \" \"\u00a0\r\necho \"This plugin is used to check page speed and Time to First Time\"\u00a0\r\necho \" \"\u00a0\r\necho -e \"Syntax:\"\u00a0\r\necho -e \"\\t\\t-f Time to First Byte\"\u00a0\r\necho -e \"\\t\\t-t Total time\"\u00a0\r\necho -e \"\\t\\t-p Pretransfer time\"\u00a0\r\necho -e \"\\t\\t-c Http status code\"\u00a0\r\necho -e \"\\t\\t-s Size download(Kb)\"\u00a0\r\necho -e \"\\t\\t-a All parameters csv format\"\u00a0\r\necho -e \"\\t\\t-h This help\"\u00a0\r\necho -e \"Samples:\"\u00a0\r\necho \" .\/page_speed -f www.yahoo.com\"\u00a0\r\necho \" \"\u00a0\r\necho \"by Manuel Angel Fernandez \u2013 manuel at rastreador.com.es\"\u00a0\r\necho \" \"\u00a0\r\nexit\u00a0\r\n}\u00a0\r\n\r\nif [ $# -eq 0 ]\u00a0\r\nthen\u00a0\r\nhelp\u00a0\r\nfi\u00a0\r\n\r\n# Main parsing code\u00a0\r\nwhile getopts \":h:f:t:p:c::s:a:\" optname\u00a0\r\ndo\u00a0\r\ncase \"$optname\" in\u00a0\r\n\"h\")\u00a0\r\nhelp\u00a0\r\n;;\u00a0\r\n\"f\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"%{time_starttransfer}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\"t\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"%{time_total}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\"p\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"%{time_pretransfer}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\"c\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"%{http_code}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\"s\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"%{size_download}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\"a\")\u00a0\r\ncurl -so \/dev\/null -H \"Pragma: no-cache\" -H \"Cache-Control: no-cache\" -w \"Timetofirstbyte\\tTotal-Time\\tPretransfer-time\\tHttp-code\\tdownload-size\\n%{time_starttransfer}\\t%{time_total}\\t%{time_pretransfer}\\t%{http_code}\\t%{size_download}\\n\" \"$OPTARG?`date +%s`\"\u00a0\r\nexit 0\u00a0\r\n;;\u00a0\r\n\r\n?)\u00a0\r\nhelp\u00a0\r\n;;\u00a0\r\ndefault)\u00a0\r\nhelp\u00a0\r\n;;\u00a0\r\n\r\nesac\u00a0\r\ndone<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Bash plugin to measure the website response speed including the following metrics: &#8211; Time to First Byte &#8211; Total load time &#8211; Pre-transfer time &#8211; Response HTTP code &#8211; Page total size Author: Manuel Angel Fernandez His blog: http:\/\/rastreador.com.es\/ Module data #!\/bin\/bash\u00a0 # Page Speed Plugin Pandora FMS Server plugin\u00a0 # (c) Manuel Angel Fernandez [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[5,15],"tags":[59],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/814"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=814"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/814\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}