This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Makes the script more portable | |
readonly DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
read -r cpu a b c previdle rest < /proc/stat | |
prevtotal=$((a+b+c+previdle)) | |
sleep 0.5 | |
read -r cpu a b c idle rest < /proc/stat | |
total=$((a+b+c+idle)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace WebSocket\Application; | |
/** | |
* Websocket-Server demo and test application. | |
* | |
* @author Simon Samtleben <[email protected]> | |
*/ | |
class LoggerApplication extends Application |