{"id":370,"date":"2016-01-13T13:02:24","date_gmt":"2016-01-13T13:02:24","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=370"},"modified":"2016-01-13T13:02:34","modified_gmt":"2016-01-13T13:02:34","slug":"checking-a-crashing-unstable-server","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2016\/01\/13\/checking-a-crashing-unstable-server\/","title":{"rendered":"Checking a crashing \/ unstable Server"},"content":{"rendered":"<p>So, what to do if a customer has a server which is frequently crashing? Well, important things to check is open files, to look at all the users in \/etc\/passwd and substitute the username to check each of their cron jobs and check the files which are open using the apache process id.<\/p>\n<p>This will help rule out a lot of common issues being seen on servers, and may even be of use for checking whether the server has been hacked.<\/p>\n<pre>\r\nnetstat -ntulp\r\nfor i in $(awk -F: '{print $1}' \/etc\/passwd); do crontab -l -u $i ;done\r\nlsof -p $(cat \/var\/run\/apache2\/apache2.pid) | grep log\r\n<\/pre>\n<p>This is a nice one liner, thanks to my colleague Aaron for providing this, well, actually it was so awesome I stole it \ud83d\ude1b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, what to do if a customer has a server which is frequently crashing? Well, important things to check is open files, to look at all the users in \/etc\/passwd and substitute the username to check each of their cron &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2016\/01\/13\/checking-a-crashing-unstable-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,15,7,29,20],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-bash","category-cloud","category-management-tools","category-monitoring","category-webhosting"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=370"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/370\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/370\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}