select * from v$resource_limit where resource_name in ('processes','sessions');
centos 7 : cpu, mem info Hint
# free # cat /proc/meminfo | grep MemTotal # grep -c processor /proc/cpuinfo # grep ^processor /proc/cpuinfo | wc -l # grep 'cpu cores' /proc/cpuinfo | tail -1
apache : concurrent connection Hint
80 port concurrent connection count # netstat -nap | grep :80 | grep ESTABLISHED | wc -l 80 port connection count # netstat -n|grep -F :80|egrep '(ESTAB|SYN)'|awk '{print $5}'|sed 's/:[0-9]*//'|sort -u|wc -l all port connection count # netstat -nap | grep ESTABLISHED | wc -l
Excel vs Unix Timestemp : excel datevalue to java dateformat Hint!
Unix Timestamp from 1970 Excel Timestamp from 1900 Gap : (1970-1900) Days = 25569 Days String rtn = ""; try{ DateFormat format = new SimpleDateFormat("yyyyMMdd"); //format.setTimeZone(TimeZone.getTimeZone("UTC")); double excelDays = Double.parseDouble((String)valv.elementAt(0)); double unixDays = (excelDays-25569); java.util.Date unixTime = new java.util.Date((long) ( 86400000l * unixDays)); rtn = format.format(unixTime); out.println(rtn); } catch(Exception e) {}
centos 7 : install node.js
# yum repolist check epel .... # yum install npm nodejs # node -v # npm -v
mac os x : mov to mp4, ffmpeg -i
$ brew install ffmpeg $ ffmpeg -i /path/file.mov /path/file.mp4
centos 7 : ntpd kernel level time sync Hint, NTP synchronized timedatectl
centos 7 NTP synchronized # timedatectl status # timedatectl set-ntp true More Hint! # timedatectl | grep -i 'time zone' # ls -l /etc/localtime # timedatectl list-timezones | grep Asia/Seoul # timedatectl set-timezone Asia/Seoul Asia/Seoul => KST yum install -y ntp firewall-cmd --add-service=ntp --permanent firewall-cmd --reload systemctl enable ntpd systemctl […]
mysql : process monitor Hint
# mysqladmin -u root -p passwd -i 1 processlist
linux : catch long processes with thread info Hint
# ps -e -T | grep mysql | grep "[0-9][0-9]:[0-9][1-9]:[0-9][0-9]\s"
linux : top with thread info Hint
# top -H -p `ps aux | grep mysql | awk '{print $2}' | paste -s -d ',' `