How to find Windows uptime?

Option 1:

1. Go to “Start” -> “Run”.

2. Write “CMD” and press on “Enter” key.

3. Write the command “net statistics server” and press on “Enter” key.

4. The line that start with “Statistics since …” provides the time that the server was up from.

The command “net stats srv” can be use instead.

Option 2:
Uptime.exe Tool Allows You to Estimate Server Availability with Windows NT 4.0 SP4 or Higher
Uptime.exe is a standalone program. To install the tool, simply copy the file into your Windows NT directory. You may then run the tool at a command prompt.

For extended help on this tool, type the following at a command prompt:
uptime /help
This tool is most accurate when run with administrator privileges, however, even without administrator privileges, the tool attempts to make a best estimate based on available information. In all cases, the results should be considered estimates.

It is important to note that the uptime and availability measurements reflect the local view of the operating system only. The “Total Uptime” measurement refers to the sum of all the time during the measured period where the operating system reported itself to be in normal operation. It does not reflect times when the server might be unavailable for other reasons, such at network outages.

It is also important to note that although the operating system is functioning normally, this does not mean that the server programs running on that server are operating normally. For instance, the operating system may be available, but a database running on that server may not be operating correctly.


Configure Dropbox as Service on Windows 2008 Win 7

– Remote desktop to your server (e.g.: with username = YourUser)

– On server, download dropbox.exe to C:\
– Start command prompt (with “YourUser” please, the idea is dropbox will be installed under this account credential and its role/right)
– Install dropbox by command prompt:

"C:\dropbox.exe" /D=C:\Program Files\Dropbox

– Run through DropBox setup, login to dropbox, use advanced install, determine local folder for sync, …
– (very important) Start Dropbox, Preferences -> uncheck “Show desktop notifications” and “Start Dropbox on system startup
– Exit dropbox (right click tray icon, Exit)
– Check StartMenu/Startup folder, remove the Dropbox shortcut (if any)
– Download Windows Server 2003 Resource Kit Files (Win2003, 2008 can use)
– Install it into your server (don’t worry about conflict, they are all M$ stuff, and they just extracts to folder)
– on command prompt, create Service by:

"C:\Program Files (x86)\Windows Resource Kits\Tools\instsrv" DropBoxService "C:\Program Files (x86)\Windows Resource Kits\Tools\srvany.exe"

– Start/Run, “Regedit”, go to

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DropBoxService

– Create KEY Parameters
– Create String value name “Application“, value C:\Program Files\Dropbox\Dropbox.exe /home
– Create String value name “AppDirectory“, value C:\Program Files\Dropbox
– Go to Administration Tools / Services -> DropBoxService -> Properties -> Log on -> Use “YourUser
– Change the service startup type to “Automatic
– Start service

That’s fine. Now you can logoff, disconnect from the server and Dropbox still up and running, sync your file.


Enable the query cache in MySQL to improve performance

If you want to get optimized and speedy response from your MySQL server then you need to add following two configurations directive to your MySQL server:

query_cache_size=SIZE
The amount of memory (SIZE) allocated for caching query results. The default value is 0, which disables the query cache.

query_cache_type=OPTION
Set the query cache type. Possible options are as follows:
0 : Don’t cache results in or retrieve results from the query cache.
1 : Cache all query results except for those that begin with SELECT S_NO_CACHE.
2 : Cache results only for queries that begin with SELECT SQL_CACHE

Howto enable caching in MySQL

You can setup caching as follows:
$ mysql -u root –p
Output:

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16 to server version: 4.1.15-Debian_1-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

Now setup cache size 16Mb:

mysql> SET GLOBAL query_cache_size = 16777216;

Query OK, 0 rows affected (0.00 sec)

mysql> SHOW VARIABLES LIKE 'query_cache_size';

Output:

 +------------------+----------+
| Variable_name    | Value    |
+------------------+----------+
| query_cache_size | 16777216 |
+------------------+----------+

You can setup them in /etc/my.cnf (Red Hat) or /etc/mysql/my.cnf (Debian) file:
# vi /etc/my.cnf
Append config directives as follows:

query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576

In above example the maximum size of individual query results that can be cached set to 1048576 using query_cache_limit system variable. Memory size in Kb.


Plesk12 what is the root password for MySQL?

Parallels Plesk Panel renames ‘root’ mysql account to ‘admin’ when the Panel is installed.
To get root privileges in mysql simply login with the ‘admin’ username instead. The password is the same as the admin password in Parallels Plesk Panel.

On server with Parallels Plesk Panel versions 8.x, 9.x and above admin password is stored in file /etc/psa/.psa.shadow. Use the following command to get the password:

~# cat /etc/psa/.psa.shadow

Since version 10 admin password stored in file /etc/psa/.psa.shadow is encrypted. Use the following command to get admin password in plain text:

~# /usr/local/psa/bin/admin –show-password

Despite version of Parallels Plesk Panel you may use the following command to login to mysql with root privileges:

~# mysql -uadmin -p`cat /etc/psa/.psa.shadow`


How-to enable gzip support on Nginx Plesk12

Create /etc/nginx/conf.d/gzip.conf with the following:

vim /etc/nginx/conf.d/gzip.conf

<code>gzip         on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types   text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary    on;


restart ngix service from Plesk or ssh</code>

gzip_types to compress other file types can be obtained from /etc/nginx/mime.types


Symantec BE: Backup Failed Access denied to directory

When backing up our linux server with RALUS having errors: Access denied to directory V-79-57344-33928 .

Perform the following at the remote Linux/UNIX computer:

1. Stop the RALUS by executing the command /etc/init.d/VRTSralus stop

2. The configuration file of the RALUS is the RALUS.cfg, located in the path /etc/VRTSralus on the remote UNIX/Linux server.

3. Open the RALUS.cfg in a text editor such as vi and locate the following line:

Software\VERITAS\Backup Exec\Engine\RALUS\Encoder=

4. Add the following to the above line: LATIN-1. The new line should like this:

Software\VERITAS\Backup Exec\Engine\RALUS\Encoder=LATIN-1

5. Execute the command /etc/init.d/VRTSralus start to start the RALUS on the remote Linux/UNIX server.

More Info at Symantec