2016年10月7日 星期五

heating & charging

here're some observation of heating & charging status on android.

  • if the device is heating, baterry discharging is faster. cooler status around 30 degrees is better and normal.
  • if USB charging causes heating, battery may have issue.
  • normal USB charging will not cause heating. wireless charging may increase 10+ degrees, to about 40-50 degrees.
  • abnormal app behavior may cause charging stop, which may sometimes induce abnormal heating.
  • USB and wireless charging are different mechanisms, which could be used to check verify physical status with each other.

2016年10月6日 星期四

cron random

sometimes we need some random time added on cron jobs, since cron of different machines may need to I/O outputs between them. randomness of several seconds is needed to prevent I/O at the same time. for example, perl can do this in one line:

# perl -le 'sleep rand 9000' && *command goes here*

REF: http://stackoverflow.com/questions/9049460/cron-jobs-and-random-times-within-giving-hours

2016年10月5日 星期三

centralized logging

Splunk, Nagios, as well as Cacti all have centralized logging capabilities for visualization, along with integration of syslog daemon. syslog plugin for Cacti is suitable for smaller environment, while Splunk or Nagios is good for more complex scenarios in Enterprise.

snort logrotate

packaged snort has logrotate rule residing in logrotate.d folder. It restarts snort with daily cron including the alert log. remember to turn it off if your snort doesn't run as a routine operation.

2016年10月3日 星期一

phplist from localhost

Here're some steps for phplist to send emal from localhost.

  • install postfix on localhost, set it as Internet site.
  • modify SMTPAutoTLS to false in admin/class.phplistmailer.php
  • set PHPMAILER host to locahost in config/config.php

2016年10月2日 星期日

nagios for netflow,: query

querying raw data in nagios is useful to pinpoint problems. but first you have to extend save time for raw data, from 24 hours to longer period. then you can query the data with syntax similar to wireshark, bu much easier. For example, such as 'src net 192.168.0.0/24 AND (dst port 21 or dst ip 8.8.8.8)'.

REF: https://library.nagios.com/library/products/nagios-network-analyzer/documentation/660-understanding-and-using-custom-queries-in-nagios-network-analyzer

2016年10月1日 星期六

EC2 hardware status

Sometimes you may find out that your EC2 instances were unexpected rebooted. You may wonder whether the root cause is purely software or related with underlying physical hardware. Status check of CloudWatch could provide useful insight via StatusCheckFailed_System, which is an indicator of its physical health status.

REF: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html