Create a python script $ more memReport.py #!/usr/bin/python import subprocess import re # Get process info ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0].decode() vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0].decode() # Iterate processes processLines = ps.split('\n') sep = re.compile('[\s]+') rssTotal = 0 # kB for row in range(1,len(processLines)): rowText = processLines[row].strip() rowElements = sep.split(rowText) try: rss = float(rowElements[0]) * 1024 except: rss = 0 # ignore...
Read MoreWarning in ./libraries/sql.lib.php#601 count(): Parameter must be an array or an object that implements Countable || (count($analyzed_sql_results[‘select_expr’] == 1) that’s missing close bracket ‘)’ before operation with 1. So changed it to || (count($analyzed_sql_results[‘select_expr’]) == 1 remove last close bracket ‘)’ at this line like this, ...
Read Morels -la | awk '{print $9}'...
Read MoreHow to disable moving faces in group FaceTime How to turn Automatic Prominence off in group FaceTime calls: Open Settings on your iPhone or iPad with iOS 13.5 or later. Choose FaceTime from the root list. Slide the toggle Speaking below the heading Automatic Prominence to the OFF position. ...
Read MoreDownload and install wakeonlan Perl script Open a terminal and type the following curl command: $ mkdir -p $HOME/bin $ curl https://raw.githubusercontent.com/jpoliv/wakeonlan/master/wakeonlan -o ~/bin/wakeonlan $ chmod +x ~/bin/wakeonlan The syntax is: $ ~/bin/wakeonlan server-mac-address-here ...
Read More