Archive for June, 2012

  • Drupal Views: selecting number of items via argument

    Drupal Views: selecting number of items via argument

    Steps to reproduce: 1. Add argument Global:Null (it might work with other arguments as well, but this seemed the least intrusive) 2. Go to ‘Specify validation criteria’ select ‘php code’ and add this: $view->set_items_per_page($argument); return true; You don’t need to change anything else in the argument – however in the ‘More’ section it might be […]

    Read more »
  • Useful command line snippets for investigating site downtime

    Useful command line snippets for investigating site downtime

    Look at incoming hosts – can be good for seeing if there is some kind of system abuse (eg ddos) netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nrk 1 | head Isolate Apache processes by account owner – sometimes it is Apache processes belonging to a particular site that are consuming memory. lsof […]

    Read more »