Cheat Sheets

Performance - TZ is set


On production servers the TZ env variable should be set to avoid filesystem stat() syscalls for timezone change detection via /etc/localtime on each call to Glibc localtime()


echo 'TZ=:/etc/localtime' >>/etc/environment.txt

Check Script:



if [ "$TZ" == "" ]; then result_failed "Environment variable TZ is not set!" else result_ok "TZ is set to '$TZ'" fi
Comment on Disqus