Interested in improving this site? Please check the To Do page.

Back to MySQL Verbs

mysql.getServerStatus

Get MySQL server information in string form

Syntax

mysql.getServerStatus(dbid)

Params

A database connection id

Returns

String containing detailed server status info (uptime, threads, etc.)

Examples

dialog.alert("Server status: " + mysql.getServerStatus(id))
	 ยป Server status: Uptime: 1497176 Threads: 1 Questions: 1000023 Slow queries: 0
           Opens: 16 Flush tables: 1 Open tables: 0 Queries per second avg: 0.668

Notes

Do not use mysql.getServerStatus to determine if your connection has or hasn't succeeded. Learn from our mistakes. Status will fail/crash if mysql.connect hasn't previously succeeded. It'll be messy, so check your result codes.

See Also


Personal Tools