Sometimes print jobs doesn't get deleted from printer queue. To solve it.
Stop spooler service.
Go to c:\windows\system32\spool\printers directory and delete *.spl & *.shd files of stuck jobs.
Start spooler service.
Nov 21, 2007
Oct 8, 2007
Outlook using old email addresses from cache
Outlook (2002 onwards) caches email addresses and store them in .NK2 file.
In some cases if this creates problem after e-mail migration. In NK2 file old email address is cached.
So while sending a new mail it fetches from cache and mail bounces.
In such case search for *.NK* files and delete them.
usually found in c:\documents and settings\profilename\application data\microsoft\outlook.
After restarting outlook it will create another .NK2 file and fresh caching starts.
In some cases if this creates problem after e-mail migration. In NK2 file old email address is cached.
So while sending a new mail it fetches from cache and mail bounces.
In such case search for *.NK* files and delete them.
usually found in c:\documents and settings\profilename\application data\microsoft\outlook.
After restarting outlook it will create another .NK2 file and fresh caching starts.
--------------------------------------------------
This also happens when we re-create a user profile or move to different PC and have fresh windows profile. In that case if we create a new email profile (e.g. new ) Then after opening outlook once, close it and then go to c:\documents and settings\profilename\application data\microsoft\outlook folder. You will see 3 files as below.
new.srs, new.xml & new.NK2
Here copy the 3 old files (old.xml, old.srs & old.NK2). Rename the old with new.
Then start outlook, it will start fetching cached entries which were stored earlier.
Aug 29, 2007
WAN connectivity / Dial up Internet : Default route
Scenario :
Two offices ( Office1 & Office2 ) connected by leased line / WAN link.
Office2 has permananet Internet link ( DSL ). It has all the application servers and an Internet proxy server.
Office1 users access internet vias Office2 proxy server.
In case of Internet link down if office1 users uses a dial up connection to an ISP their default gateway changes to ISP. So they loose the connectivity to Office1 application servers as well.
For that office1 user has to add a route manually for Office2 network address.
Also one can use persistent option to have that route added permanently.
Two offices ( Office1 & Office2 ) connected by leased line / WAN link.
Office2 has permananet Internet link ( DSL ). It has all the application servers and an Internet proxy server.
Office1 users access internet vias Office2 proxy server.
In case of Internet link down if office1 users uses a dial up connection to an ISP their default gateway changes to ISP. So they loose the connectivity to Office1 application servers as well.
For that office1 user has to add a route manually for Office2 network address.
Also one can use persistent option to have that route added permanently.
Aug 28, 2007
Windows server restarts taking long time
Slower shutdowns typically happens with a domain controller running exchange. In many cases it takes more than 10 minutes or more to shutdown. This happens because the Lsass (Active Directory related) service shuts down before the Exchange-related services shutdown. Exchange services keeps trying for contacting AD and it takes longer time to shutdown.
To make windows server restart process faster :
it is suggested to manually stop Exchange services before proceeding with shutdown or restart of a domain controller.
Also I have manually stopped few other services as well before restart and this has made server shutdown even faster. Finally I created a dos batch file to stop the services and then initiate the server restart.
Following are the command which can be included in the batch file.
net stop alerter
net stop msexchangeis /y
net stop msexchangesa /y
net stop msexchangemta /y
net stop imap4svc /y
net stop resvc /y
net stop pop3svc /y
net stop msexchangemgmt /y
net stop policyagent
net stop defwatch
net stop sens
net stop schedule
net stop plugplay
net stop spooler
net stop w3svc
net stop iisadmin
net stop messenger
net stop winvnc
net stop wsusservice
net stop termservice
net stop dhcpserver
net stop ismserv
net stop winmgmt /y
net stop wmi /y
net stop wuauserv
net stop casunivdomainsvr
net stop casjobengine
net stop casmsgengine
net stop cassvccontrolsvr
net stop castapeengine
net stop cadiscoverysvc
__________________________________
Also in the case of server startup : we can set few services start status as manual and the use net start commands batch file to start those service after server boots up.
To make windows server restart process faster :
it is suggested to manually stop Exchange services before proceeding with shutdown or restart of a domain controller.
Also I have manually stopped few other services as well before restart and this has made server shutdown even faster. Finally I created a dos batch file to stop the services and then initiate the server restart.
Following are the command which can be included in the batch file.
net stop alerter
net stop msexchangeis /y
net stop msexchangesa /y
net stop msexchangemta /y
net stop imap4svc /y
net stop resvc /y
net stop pop3svc /y
net stop msexchangemgmt /y
net stop policyagent
net stop defwatch
net stop sens
net stop schedule
net stop plugplay
net stop spooler
net stop w3svc
net stop iisadmin
net stop messenger
net stop winvnc
net stop wsusservice
net stop termservice
net stop dhcpserver
net stop ismserv
net stop winmgmt /y
net stop wmi /y
net stop wuauserv
net stop casunivdomainsvr
net stop casjobengine
net stop casmsgengine
net stop cassvccontrolsvr
net stop castapeengine
net stop cadiscoverysvc
__________________________________
Also in the case of server startup : we can set few services start status as manual and the use net start commands batch file to start those service after server boots up.
Windows roaming profile size issue
Regarding windows roaming profile usually the size shall be 25 MB to 30 MB. Once it grows due to synchronization process, logon and logoff takes longer times.
To manage the profile size few things can be implemented.
1. By default exclude folders "Temporary Internet Files" and "Temp".
For temporary internet files one should change the path of temporary internet folder to local drive. Usually this is large.
2. Other folders like "My Documents" and "Start menu" can be excluded from synchronization.
_______________________________________
Finally if profile has synchronization issues and if one needs to recreate a romaing profile. Steps are as follows:
1. Logoff as user.
2. With Domain admin login rename the profile on local PC and server E.g. user1 rename to user1profilebak . One may need to take the ownership of user's profile folder (NTFS permissions).
3. From PC login as user and copy required data from rename profile folder to respective folders i.e. favorites, cookies, my documents.
To manage the profile size few things can be implemented.
1. By default exclude folders "Temporary Internet Files" and "Temp".
For temporary internet files one should change the path of temporary internet folder to local drive. Usually this is large.
2. Other folders like "My Documents" and "Start menu" can be excluded from synchronization.
_______________________________________
Finally if profile has synchronization issues and if one needs to recreate a romaing profile. Steps are as follows:
1. Logoff as user.
2. With Domain admin login rename the profile on local PC and server E.g. user1 rename to user1profilebak . One may need to take the ownership of user's profile folder (NTFS permissions).
3. From PC login as user and copy required data from rename profile folder to respective folders i.e. favorites, cookies, my documents.
Aug 27, 2007
Autobackup of mysql and then ftp to other PC from linux
push.sh : script
1: mysqldump --add-drop-table -C -l -pPASSWORD -r /home/root/dbbackup DBNAME
2: Today="`date +%d%b%y_%H%M`"
3: mv /home/root/dbbackup /home/root/dbbackup_$Today
4: cp /home/root/dbbackup* /backup/ (This creates a backup on same PC ).
5: /usr/local/bin/ncftpput -u sql -p sql123 -V 172.x.x.x (FTP server IP) . /home/root/dbbackup*
6: rm -rf /home/root/dbbackup*
Explantion : First backup of database then define variable with current date & time.
Append variable to filename and copy it to a folder. From their do ncftp to an ftp server and then finally from the local folder delete all the files.
To repeat the procedure use cron:
crontab -e
59 10 * * 1-7 /home/root/push.sh
minute hour day(0-31) month(0-12) day of week(1-7)
: /var/spool/cron/ folder will contain
59 10 * * 1-7 /home/root/push.sh
1: mysqldump --add-drop-table -C -l -pPASSWORD -r /home/root/dbbackup DBNAME
2: Today="`date +%d%b%y_%H%M`"
3: mv /home/root/dbbackup /home/root/dbbackup_$Today
4: cp /home/root/dbbackup* /backup/ (This creates a backup on same PC ).
5: /usr/local/bin/ncftpput -u sql -p sql123 -V 172.x.x.x (FTP server IP) . /home/root/dbbackup*
6: rm -rf /home/root/dbbackup*
Explantion : First backup of database then define variable with current date & time.
Append variable to filename and copy it to a folder. From their do ncftp to an ftp server and then finally from the local folder delete all the files.
To repeat the procedure use cron:
crontab -e
59 10 * * 1-7 /home/root/push.sh
minute hour day(0-31) month(0-12) day of week(1-7)
: /var/spool/cron/ folder will contain
59 10 * * 1-7 /home/root/push.sh
Windows XP Performance
For improving the windows XP performance one can stop some / all of the following services.
1. Fast user switching.
2. Help and Support.
3. IPSEC
4. Messenger
5. SSDP Discovery service
6. System Restore service ( Consumes more resources and also recommended to stop for preventing spreading of viruses )
7. Task scheduler.
8. Wireless Zero configuration.
__________________________________
Finally go to My Computer -> Properties -> Advanced -> Performance -> settings tab.
Select Adjust for best performance.
1. Fast user switching.
2. Help and Support.
3. IPSEC
4. Messenger
5. SSDP Discovery service
6. System Restore service ( Consumes more resources and also recommended to stop for preventing spreading of viruses )
7. Task scheduler.
8. Wireless Zero configuration.
__________________________________
Finally go to My Computer -> Properties -> Advanced -> Performance -> settings tab.
Select Adjust for best performance.
jre on fedora core
By default, Fedora Core 6 systems come with an old Java software installed, so you need to install a newer version of Java Runtime Environment to enjoy all the Java applications available.
Download linux version of JRE and save in /opt folder.
e.g. jre-1_5_0_09- linux-i586.bin
Make this file executable : chmod +x jre-1_5_0_xx-linux-i586.bin
And now, let's run the executable file with the following command:
./jre-1_5_0_xx-linux-i586.bin
You'll be prompted with the License Agreement, hit space until you are asked if you agree or not. Type Yes and the extraction process will begin. After the extraction process is finished, just remove the binary file with the following command:
rm -rf jre-1_5_0_xx-linux-i586.bin
Now, let's put the Java plugin into your browser's plugin folder. Konqueror, Firefox and Mozilla browsers will all look into the same folder, for plugins. So type the following command:
ln -s /opt/jre1.5.0_xx/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/mozilla/plugins/libjavaplugin_oji.so
To make the Java executable available for the whole system, so you can run all the Java applications you encounter. Create the following file with your preferred text editor:
vi /etc/profile.d/java.sh
export J2RE_HOME=/opt/jre-1_5_0_xx-linux-i586.bin
export PATH=$J2RE_HOME/bin:$PATH
Type the following command to make that file available:
source /etc/profile.d/java.sh
Then type this command to see if the path is correct:
which java
You will see something like this: /opt/jre1.5.0_09/bin/java
Then type these commands:
/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5.0_xx/bin/java 2/usr/sbin/alternatives --config java
After you have entered the last command, you'll be asked to choose which Java software you want for your system. Just press 2 key and hit enter.
And finally, just type this command to see if everything looks good and your system has a new Java Environment:
/usr/sbin/alternatives --display java
And you can also type this command to see the version of your Java Runtime Environment:
java -version
It looks like this:
java version "1.5.0_09"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)
You should now be able to run most of the Java applications out there, with the commands like:
java -jar application.jar
or
javaws application.jnlp
Download linux version of JRE and save in /opt folder.
e.g. jre-1_5_0_09- linux-i586.bin
Make this file executable : chmod +x jre-1_5_0_xx-linux-i586.bin
And now, let's run the executable file with the following command:
./jre-1_5_0_xx-linux-i586.bin
You'll be prompted with the License Agreement, hit space until you are asked if you agree or not. Type Yes and the extraction process will begin. After the extraction process is finished, just remove the binary file with the following command:
rm -rf jre-1_5_0_xx-linux-i586.bin
Now, let's put the Java plugin into your browser's plugin folder. Konqueror, Firefox and Mozilla browsers will all look into the same folder, for plugins. So type the following command:
ln -s /opt/jre1.5.0_xx/plugin/i386/ns7/libjavaplugin_oji.so
/usr/lib/mozilla/plugins/libjavaplugin_oji.so
To make the Java executable available for the whole system, so you can run all the Java applications you encounter. Create the following file with your preferred text editor:
vi /etc/profile.d/java.sh
export J2RE_HOME=/opt/jre-1_5_0_xx-linux-i586.bin
export PATH=$J2RE_HOME/bin:$PATH
Type the following command to make that file available:
source /etc/profile.d/java.sh
Then type this command to see if the path is correct:
which java
You will see something like this: /opt/jre1.5.0_09/bin/java
Then type these commands:
/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5.0_xx/bin/java 2/usr/sbin/alternatives --config java
After you have entered the last command, you'll be asked to choose which Java software you want for your system. Just press 2 key and hit enter.
And finally, just type this command to see if everything looks good and your system has a new Java Environment:
/usr/sbin/alternatives --display java
And you can also type this command to see the version of your Java Runtime Environment:
java -version
It looks like this:
java version "1.5.0_09"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)
You should now be able to run most of the Java applications out there, with the commands like:
java -jar application.jar
or
javaws application.jnlp
Labels:
Linux
windows non-interactive ftp
ftp -s:filename host
filename contetns:
user
password
cd /web
pwd
put d:\src\test01.htm
binary
put d:\src\xyz.zip
quit
filename contetns:
user
password
cd /web
pwd
put d:\src\test01.htm
binary
put d:\src\xyz.zip
quit
Windows rename a file date_time appended to a filename
ren abc.txt abc-%date:~4,2%-%date:~7,2%-%date:~10,4%_@_%time:~0,2%h%time:~3,2%m.txt
Above command will rename the file as given below.
abc-08-27-2007_@_11h30m.txt
Above command will rename the file as given below.
abc-08-27-2007_@_11h30m.txt
enable ssh on linux
edit /etc/ssh/sshd_config change permit root login to yes
save file
run the following commands to enable ssh
/usr/sbin/yesconfig -t enable-ssh /etc/init.d/sshd restart
save file
run the following commands to enable ssh
/usr/sbin/yesconfig -t enable-ssh /etc/init.d/sshd restart
Labels:
Linux
Mysql on Linux : performance
1. Mysql on Linux : performance.
MySQL Community Server compiled with the Intel CC compiler ver. 5.0.37 : gives faster performance on Intel hardware than those compiled with standard GCC compiler. ( This has been suggested by mysql. )
I had installed this Intel compiled mysql community server and noticed the performance difference.
In fact the query response time has improved from 20-25 seconds to 4-5 seconds.
MySQL Community Server compiled with the Intel CC compiler ver. 5.0.37 : gives faster performance on Intel hardware than those compiled with standard GCC compiler. ( This has been suggested by mysql. )
I had installed this Intel compiled mysql community server and noticed the performance difference.
In fact the query response time has improved from 20-25 seconds to 4-5 seconds.
Subscribe to:
Posts (Atom)