Is there a way to query online status from command line

You may easily check with the link, provided above.