-email(test.example.net)
-foldertest (don't sync)
-Inbox (sync with webmail)
-Junk E-mail (don't sync)
-mail (sync)
-Drafts( sync)
-savedemail( sync)
-Sent (need to specify when first configured)
-test (sync)
+Update Folder list (to sync webmail)
Imap sync(mark READ for another Imap device), POP3 download(mark UNREAD)
Tuesday, August 23, 2011
Monday, August 22, 2011
Centos 6 Default networking
Category:
Centos 6
— SkyHi @ Monday, August 22, 2011
Default GUI Static IP Configuration:
============================================================================
RHEL/CentOS 6 does not configure network interfaces on default installation. Also, it is configured to use NetworkManager. To enable networking interface and disable NetworkManager please follow instructions below.
The /etc/sysconfig/network-scripts/ifcfg-eth0 content looks as follows on default installation.
For DHCP, configure the interface as follows.
For Static ip, configure it as follows
Change the /etc/sysconfig/network to have the GATEWAY.
Change /etc/resolve.conf
For example configuration, see Method #3
http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration/
Restart the network after configuration.
NOTE: In order to edit partition, you must use GUI with 512MB RAM. Duh!!
REFERENCES
http://www.convirture.com/ee_wiki/index.php?title=RedHat_6_Networking
DEVICE="eth0" NM_CONTROLLED="no" ONBOOT="yes" HWADDR=00:0C:29:44:5B:C2 TYPE=Ethernet BOOTPROTO=none IPADDR=192.168.100.183 PREFIX=24 GATEWAY=192.168.100.2 DNS1=192.168.100.2 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0" UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
============================================================================
RHEL/CentOS 6 does not configure network interfaces on default installation. Also, it is configured to use NetworkManager. To enable networking interface and disable NetworkManager please follow instructions below.
The /etc/sysconfig/network-scripts/ifcfg-eth0 content looks as follows on default installation.
DEVICE="eth0" HWADDR=specifc mac address NM_CONTROLLED="yes" ONBOOT="no"
For DHCP, configure the interface as follows.
DEVICE="eth0" HWADDR=specifc mac address NM_CONTROLLED="no" ONBOOT="yes" BOOTPROTO="dhcp"
Restart the network after configuration. /etc/init.d/network restart
For Static ip, configure it as follows
DEVICE="eth0" HWADDR=specifc mac address NM_CONTROLLED="no" ONBOOT="yes" BOOTPROTO="static" IPADDR=ip address here. NETMASK=netmask here.
Change the /etc/sysconfig/network to have the GATEWAY.
NETWORKING=yes HOSTNAME=www1.nixcraft.in GATEWAY=gateway address here.
Change /etc/resolve.conf
nameserver IP
For example configuration, see Method #3
http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration/
Restart the network after configuration.
/etc/init.d/network restart
NOTE: In order to edit partition, you must use GUI with 512MB RAM. Duh!!
REFERENCES
http://www.convirture.com/ee_wiki/index.php?title=RedHat_6_Networking
Thursday, August 18, 2011
Measure tomcat Performance with ab
Category:
Apache,
Performance Tune
— SkyHi @ Thursday, August 18, 2011
Server - Ubuntu
Typically when you want to measure tomcat performance, you will set up the client on a separate machine so that when you are doing testing the client resource usage does not impact the test.
Measuring with Apache Bench
The Apache Bench will probably be installed by default on the Ubuntu server. What this tool does is to allow you to select one URL and test against that single URL. In the test that you see below ab was told to retrieve the web URL 100,000 times with a concurrency maximum of 149, since the max is 150 by default with tomcat.
The max threads are listed in the /usr/share/tomcat7/conf/server.xml file as seen here.
An important point to make here is that you want to perform enough requests to get an accurate view of performance. Most bench marks will be best with over 100,000 requests. The “-k” causes ab to use keep-alive connections which is more efficient but maybe not representative of your situation so try both ways to get a understanding of the differences.
ab -k -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: 192.168.5.44
Server Port: 8080
Document Path: /
Document Length: 11850 bytes
Concurrency Level: 149
Time taken for tests: 101.501 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 1207100000 bytes
HTML transferred: 1185000000 bytes
Requests per second: 985.21 [#/sec] (mean)
Time per request: 151.237 [ms] (mean)
Time per request: 1.015 [ms] (mean, across all concurrent requests)
Transfer rate: 11613.74 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 61 204.1 47 3151
Processing: 3 90 158.2 64 2509
Waiting: 0 65 158.9 40 2476
Total: 4 150 259.0 119 4306
Percentage of the requests served within a certain time (ms)
50% 119
66% 121
75% 122
80% 122
90% 134
95% 189
98% 611
99% 1388
100% 4306 (longest request)
Once the test is complete take a look at the use of tcp_max_tw_buckets as you will certainly see how long it take to break down the tcp connections to your server.
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34064 CLOSE_WAIT
tcp6 0 0 192.168.5.44:8080 192.168.5.44:33955 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34027 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:33912 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34025 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:39259 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34063 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34082 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:33849 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34062 CLOSE_WAIT
---cut---
Once a test has been performed you may want to increase the tcp_max_tw_buckets setting. First, list the current settings with:
cat /proc/sys/net/ipv4/tcp_max_tw_buckets
65536
echo 2000000 > /proc/sys/net/ipv4/tcp_max_tw_buckets
ab -k -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: 192.168.5.44
Server Port: 8080
Document Path: /
Document Length: 11850 bytes
Concurrency Level: 149
Time taken for tests: 99.644 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 1207100000 bytes
HTML transferred: 1185000000 bytes
Requests per second: 1003.57 [#/sec] (mean)
Time per request: 148.470 [ms] (mean)
Time per request: 0.996 [ms] (mean, across all concurrent requests)
Transfer rate: 11830.18 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 61 199.5 47 3100
Processing: 4 87 157.1 63 7623
Waiting: 1 64 155.7 40 7595
Total: 8 148 251.6 118 7630
Percentage of the requests served within a certain time (ms)
50% 118
66% 120
75% 121
80% 122
90% 145
95% 185
98% 440
99% 1408
100% 7630 (longest request)
Here is an example of the result with no “-k” keep-alive connections. What you can see is a dramatic difference in time and as a result it reached the timeout and quit.
ab -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
apr_poll: The timeout specified has expired (70007)
Total of 28621 requests completed
REFERENCES
http://beginlinux.com/server/ubuntu/measure-tomcat-performance-with-ab
Typically when you want to measure tomcat performance, you will set up the client on a separate machine so that when you are doing testing the client resource usage does not impact the test.
Measuring with Apache Bench
The Apache Bench will probably be installed by default on the Ubuntu server. What this tool does is to allow you to select one URL and test against that single URL. In the test that you see below ab was told to retrieve the web URL 100,000 times with a concurrency maximum of 149, since the max is 150 by default with tomcat.
The max threads are listed in the /usr/share/tomcat7/conf/server.xml file as seen here.
An important point to make here is that you want to perform enough requests to get an accurate view of performance. Most bench marks will be best with over 100,000 requests. The “-k” causes ab to use keep-alive connections which is more efficient but maybe not representative of your situation so try both ways to get a understanding of the differences.
ab -k -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: 192.168.5.44
Server Port: 8080
Document Path: /
Document Length: 11850 bytes
Concurrency Level: 149
Time taken for tests: 101.501 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 1207100000 bytes
HTML transferred: 1185000000 bytes
Requests per second: 985.21 [#/sec] (mean)
Time per request: 151.237 [ms] (mean)
Time per request: 1.015 [ms] (mean, across all concurrent requests)
Transfer rate: 11613.74 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 61 204.1 47 3151
Processing: 3 90 158.2 64 2509
Waiting: 0 65 158.9 40 2476
Total: 4 150 259.0 119 4306
Percentage of the requests served within a certain time (ms)
50% 119
66% 121
75% 122
80% 122
90% 134
95% 189
98% 611
99% 1388
100% 4306 (longest request)
Once the test is complete take a look at the use of tcp_max_tw_buckets as you will certainly see how long it take to break down the tcp connections to your server.
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34064 CLOSE_WAIT
tcp6 0 0 192.168.5.44:8080 192.168.5.44:33955 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34027 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:33912 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34025 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:39259 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34063 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34082 CLOSE_WAIT
tcp6 1 0 192.168.5.44:8080 192.168.5.44:33849 CLOSE_WAIT
tcp6 86 0 192.168.5.44:8080 192.168.5.44:34062 CLOSE_WAIT
---cut---
Once a test has been performed you may want to increase the tcp_max_tw_buckets setting. First, list the current settings with:
cat /proc/sys/net/ipv4/tcp_max_tw_buckets
65536
echo 2000000 > /proc/sys/net/ipv4/tcp_max_tw_buckets
ab -k -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: 192.168.5.44
Server Port: 8080
Document Path: /
Document Length: 11850 bytes
Concurrency Level: 149
Time taken for tests: 99.644 seconds
Complete requests: 100000
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 1207100000 bytes
HTML transferred: 1185000000 bytes
Requests per second: 1003.57 [#/sec] (mean)
Time per request: 148.470 [ms] (mean)
Time per request: 0.996 [ms] (mean, across all concurrent requests)
Transfer rate: 11830.18 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 61 199.5 47 3100
Processing: 4 87 157.1 63 7623
Waiting: 1 64 155.7 40 7595
Total: 8 148 251.6 118 7630
Percentage of the requests served within a certain time (ms)
50% 118
66% 120
75% 121
80% 122
90% 145
95% 185
98% 440
99% 1408
100% 7630 (longest request)
Here is an example of the result with no “-k” keep-alive connections. What you can see is a dramatic difference in time and as a result it reached the timeout and quit.
ab -n 100000 -c 149 http://192.168.5.44:8080/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.5.44 (be patient)
Completed 10000 requests
Completed 20000 requests
apr_poll: The timeout specified has expired (70007)
Total of 28621 requests completed
REFERENCES
Thursday, August 11, 2011
Rate limiting login attempts with iptables
Rate limiting login attempts is an easy way to prevent some of the high speed password guessing attacks. However, it's hard to limit distributed attacks and many run at a low pace over weeks or months. I personally prefer to avoid using automated response tools like fail2ban. And this is for two reasons:
Legitimate users sometimes forget their passwords. I don't want to ban legitimate users from my server, forcing me to manually enable their accounts again (or worse, try to figure out which of the 100/1000 banned IP addresses is theirs).
An IP address is not a good identifier for a user. If you have multiple users behind a single IP (for example, a school that runs NAT on 500 student machines) a single user making a few bad guesses can land you in a world of pain. At the same time the majority of the password guessing attempts I see are distributed.
Therefore I don't consider fail2ban (and similar automated response tools) a very good approach to securing a server against brute force attacks. A simple IPTables rules set to cut down on the log spam (which I have on most of my linux servers) is something like this:
It prevents more than 4 connection attempts from a single IP to ssh in any 60 second period. The rest can be handled by ensuring passwords are reasonably strong. On high security servers forcing the users to use public key authentication is another way to stop guessing.
REFERENCES
http://serverfault.com/questions/216995/is-it-worth-the-effort-to-block-failed-login-attempts
Legitimate users sometimes forget their passwords. I don't want to ban legitimate users from my server, forcing me to manually enable their accounts again (or worse, try to figure out which of the 100/1000 banned IP addresses is theirs).
An IP address is not a good identifier for a user. If you have multiple users behind a single IP (for example, a school that runs NAT on 500 student machines) a single user making a few bad guesses can land you in a world of pain. At the same time the majority of the password guessing attempts I see are distributed.
Therefore I don't consider fail2ban (and similar automated response tools) a very good approach to securing a server against brute force attacks. A simple IPTables rules set to cut down on the log spam (which I have on most of my linux servers) is something like this:
iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 -j DROP
It prevents more than 4 connection attempts from a single IP to ssh in any 60 second period. The rest can be handled by ensuring passwords are reasonably strong. On high security servers forcing the users to use public key authentication is another way to stop guessing.
REFERENCES
http://serverfault.com/questions/216995/is-it-worth-the-effort-to-block-failed-login-attempts
sendmail use of clientmqueue and mqueue folders
Category:
Sendmail
— SkyHi @ Thursday, August 11, 2011
The flag for flushing the queue is -q (issue sendmail -q). However, I presume you are having sendmail run as a daemon, therefore, you would want to start it as sendmail -bd -q5m. If RH8.0 is configured as RH7.3, the startup flags are in /etc/sysconfig/sendmail and should look as follows:
DAEMON=yes
QUEUE=5h
The script in /etc/init.d (sendmail) will read this file for the options.
-db starts sendmail as a daemon, -q5m says flush every five minutes. Note that most mail is sent and forwarded immediately, flushing is needed only if for some reason the route to intended recipient (and intended mail exchangers) is down (most usually for me, my own internet connection), or if you are acting as a MX for another mail server. In those cases, mailed is spooled in /var/spool/mqueue until it either timesout (usually about 5 days, depending on setup) or can be sent on.
=======================================================================
When submitting mail by using sendmail as a mail submission program, sendmail copies all messages to "/var/spool/clientmqueue" first. Sendmail is a setgid smmsp program and thus gives any user the permission to do so (/var/spool/clientmqueue belongs to user and group smmsp). Later, another sendmail process, the sendmail mail transfer agent (MTA) copies the messages from /var/spool/clientmqueue to /var/spool/mqueue and sends them to their destination.
/var/spool/clientmqueue is thus the holding area used by the MSP (Mail Submission Protocol) sendmail instance before it injects the messages into the main MTA (Mail Transport Agent) sendmail instance.
Sendmail will save the message in /var/spool/clientmqueue for safe keeping before trying to connect to the MTA to get the message delivered. Normally there would be a 'queue runner' MSP sendmail instance which every half hour would retry sending any message that couldn't be sent immediately. Each message will generate a 'df' (message routing info) and 'qf' (message headers and body) file. You can list out all of the messages and their status by:
When files accumulate in /var/spool/clientmqueue, this is probably due to sendmail localhost MTA not running, and thus the mails don't get send.
=======================================================================
The E-mail Message's Way from Client to Client
After you have sent the e-mail message to the SMTP server that communicates with your computer the message still has a long way to travel before it reaches your recipient's computer. The moment after the e-mail message has been
successfully transferred to your SMTP server; the server must find your recipient's mail server and transfer the message to that server. To locate the server that the recipient uses, the recipient's e-mail address will be examined and the domain name extracted by reading the information after the "@" character (the domain name is always found after the "@" character in the e-mail address). By using this domain name and then checking with a Domain Name Server (DNS), the location (the IP number) of this server will be found. After that, a communication line will be established between your mail server and your recipient's mail server.
The communication between these two mail servers are basically the same as the communication between your computer and your SMTP server. The SMTP protocol is used and the port number 25 (at your recipient's mail server) is used. The commands used are normally also the same and the e-mail message is transferred in similar way as when it was transferred from your computer to your SMTP server.
However, sometimes there can be technical problems at the recipient's server and the e-mail message can not be transferred. To handle such a situation the message goes into a queue. The SMTP server on most machines uses a program called sendmail to do the actual sending, so this queue is called the sendmail queue. Sendmail will periodically try to resend the messages in its queue. For example, it might retry every 15 minutes. After 4 hours, it will usually send you a piece of mail that tells you there is some sort of problem. After 5 days, most sendmail configurations give up and return the mail to you undelivered.
If the message have been successfully transferred to your recipient's mail server, it will then be stored in his/her POP3 server and when the recipient start downloading his/her e-mails, your e-mail message will appear in the inbox of the recipient's e-mail client program.
=======================================================================
REFERENCES
http://emailitis.com/support/faqs/email-faqs/76-what-is-greylisting-spam
http://www.samlogic.net/articles/smtp.htm
http://arstechnica.com/civis/viewtopic.php?f=16&t=1111517
DAEMON=yes
QUEUE=5h
The script in /etc/init.d (sendmail) will read this file for the options.
-db starts sendmail as a daemon, -q5m says flush every five minutes. Note that most mail is sent and forwarded immediately, flushing is needed only if for some reason the route to intended recipient (and intended mail exchangers) is down (most usually for me, my own internet connection), or if you are acting as a MX for another mail server. In those cases, mailed is spooled in /var/spool/mqueue until it either timesout (usually about 5 days, depending on setup) or can be sent on.
=======================================================================
When submitting mail by using sendmail as a mail submission program, sendmail copies all messages to "/var/spool/clientmqueue" first. Sendmail is a setgid smmsp program and thus gives any user the permission to do so (/var/spool/clientmqueue belongs to user and group smmsp). Later, another sendmail process, the sendmail mail transfer agent (MTA) copies the messages from /var/spool/clientmqueue to /var/spool/mqueue and sends them to their destination.
/var/spool/clientmqueue is thus the holding area used by the MSP (Mail Submission Protocol) sendmail instance before it injects the messages into the main MTA (Mail Transport Agent) sendmail instance.
Sendmail will save the message in /var/spool/clientmqueue for safe keeping before trying to connect to the MTA to get the message delivered. Normally there would be a 'queue runner' MSP sendmail instance which every half hour would retry sending any message that couldn't be sent immediately. Each message will generate a 'df' (message routing info) and 'qf' (message headers and body) file. You can list out all of the messages and their status by:
# mailq -v -AcWhen files accumulate in /var/spool/clientmqueue, this is probably due to sendmail localhost MTA not running, and thus the mails don't get send.
=======================================================================
The E-mail Message's Way from Client to Client
After you have sent the e-mail message to the SMTP server that communicates with your computer the message still has a long way to travel before it reaches your recipient's computer. The moment after the e-mail message has been
The communication between these two mail servers are basically the same as the communication between your computer and your SMTP server. The SMTP protocol is used and the port number 25 (at your recipient's mail server) is used. The commands used are normally also the same and the e-mail message is transferred in similar way as when it was transferred from your computer to your SMTP server.
However, sometimes there can be technical problems at the recipient's server and the e-mail message can not be transferred. To handle such a situation the message goes into a queue. The SMTP server on most machines uses a program called sendmail to do the actual sending, so this queue is called the sendmail queue. Sendmail will periodically try to resend the messages in its queue. For example, it might retry every 15 minutes. After 4 hours, it will usually send you a piece of mail that tells you there is some sort of problem. After 5 days, most sendmail configurations give up and return the mail to you undelivered.
If the message have been successfully transferred to your recipient's mail server, it will then be stored in his/her POP3 server and when the recipient start downloading his/her e-mails, your e-mail message will appear in the inbox of the recipient's e-mail client program.
=======================================================================
# service sendmail stop # cd /var/spool/mqueue # for ML in `grep -l "misspelled_address\@gmail.com" *`; do sed -i -e 's/misspelled_address\@gmail.com/postmaster\@localhost/g' $ML; done # service sendmail start # sendmail -q -v
REFERENCES
http://emailitis.com/support/faqs/email-faqs/76-what-is-greylisting-spam
http://www.samlogic.net/articles/smtp.htm
http://arstechnica.com/civis/viewtopic.php?f=16&t=1111517
Wednesday, August 10, 2011
Change the Queue Runner Interval in Sendmail
Category:
Sendmail
— SkyHi @ Wednesday, August 10, 2011
The default in CentOS 5.x is 1 hour:
REFERENCES
http://rambleon.usebox.net/post/317857580/change-the-queue-runner-interval-in-sendmail
# pgrep -lf "Queue runner" 12443 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
You can change it editing /etc/sysconfig/sendmail (ie. set 30 minutes):
DAEMON=yes
QUEUE=30m It’s easy, isn’t it? Useful for mail backup MXs that may need shorter queue run times.REFERENCES
http://rambleon.usebox.net/post/317857580/change-the-queue-runner-interval-in-sendmail
Friday, August 5, 2011
mysqldump
Category:
MySQL
— SkyHi @ Friday, August 05, 2011
@echo off @echo Backing Up Server1 mysqldump -A -Q -R -c -e --lock-tables=FALSE -uXXXX -pXXXX -hX.X.X.1 > c:\backup\01.sql @echo Backing Up Server2 mysqldump -A -Q -R -c -e --lock-tables=FALSE -uXXXX -pXXXX -hX.X.X.2 > c:\backup\02.sql @echo Backing Up Server3 mysqldump -A -Q -R -c -e --lock-tables=FALSE-uXXXX -pXXXX -hX.X.X.3 > c:\backup\03.sql set folderdate=%date:~7,2%-%date:~4,2%-%date:~10,4% mkdir c:\backup\%folderdate% set foldertime=%time:~0,2%-%time:~3,2% mkdir c:\backup\%folderdate%\%foldertime% move c:\backup\*.sql c:\backup\%folderdate%\%foldertime%\
@ECHO OFF set folderdate=%date:~7,2%-%date:~4,2%-%date:~10,4% move D:\seccam-data\0 D:\seccam-data\0_%folderdate% mkdir D:\seccam-date\0
REFERENCES
http://www.robvanderwoude.com/datetiment.php#SetDate
http://forums.techguy.org/dos-other/79088-how-rename-folder-dos.html
http://twigstechtips.blogspot.com/2009/03/cant-change-directory-to-another-drive.html
Subscribe to:
Posts (Atom)
