Keep it simple. I have never heard that any ext4 tuning has made a significant difference in a benchmark.
You can do the safe things: use a block size of 4KB and mount with noatime, but don't expect a performance boost.
You should not have the database on the root file system. Create a special file system for the database, so that the operating system is ...
I think you posted on here the other day asking a similar question.
1) Don't use mysql start, use sudo service mysql start or similar.
2) You don't want to change the permissions on /var/log/mysql - Administer Ubuntu properly and change to the mysql user in order to view them, using sudo su - mysql
Do not attempt to start MySQL as your user, or hack the ...
My windows user was not allowed to run netstat -abn as suggested in geographika's answer, but I could work around it:
By using tasklist | find /i "Ssms.exe", getting following result:
Ssms.exe 14144 RDP-Tcp#15 3 233.384 K
14144 in the example above is the PID, and when tried netstat -oan | find /i "14144"
Trying mysql's built in table check/fix/ etc functions did not help my in restarting mysql server in regular mode.
I ended up:
1) doing mysqldump of all the databases, into one file.
This article was immensely helpful
2) dropping 1 db at a time, and attempting to restart mysql server in regular mode, after each drop (nothing helped).
3) I ended up purging ...
You would want to query the query column of pg_stat_activity with a query like
WHERE state = 'active';
This will show the first 1024 characters of the query.
If that is not enough, raise the track_activity_query_size parameter.
If you are writing monitoring script, have your looked at PostgreSQL monitoring solutions: https://wiki.postgresql.org/wiki/Monitoring#Checkers
I have already used check_postgres that has a linux CLI that can be customized, that fits with activity checks.