posts | comments
28Feb

Very very usefull IIS appcmd.exe command line solutions

No comments

Application Pools
1. Recycle all application pools (replace recycle with start/stop to start/stop all apppools)
appcmd list apppool /xml | appcmd recycle apppool /in

2. Stop application pools with word “cheap” in it
appcmd list apppool /name:”$=*cheap*” /xml | appcmd stop apppool /in

3. Set property enable32BitAppOnWin64 to true for all apppools (Filter apppools as in 2 if needed)
appcmd list apppool /xml | appcmd set apppool /in /enable32BitAppOnWin64:true

4. Start apppools which are stopped
appcmd list apppool /state:Stopped /xml | appcmd start apppool /in

5. Recycle application pools which are used in some applications
appcmd list app /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in
appcmd list app /xml | appcmd recycle apppool /in (This might recycle one apppool multiple times)

6. Recycle apppools serving website “Default Web Site”
appcmd list site “Default Web Site” /xml | appcmd list app /in /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in
appcmd list app /site.name:”Default Web Site” /xml | appcmd list apppool /in /xml | appcmd recycle apppool /in

Sites
7. Start all the sites (Replace start with stop to stop all sites)
appcmd list site /xml | appcmd start site /in

8. Start the sites which are stopped
appcmd list site /state:stopped /xml | appcmd start site /in

9. Set serverAutoStart to false for all sites
appcmd list site /xml | appcmd set site /serverAutoStart:false /in

10. Keep sites config data and restore later
appcmd list site /config /xml > sites.xml
appcmd add sites /in < sites.xml

Applications and Vdirs
11. Delete all apps which are using a particular apppool
appcmd list apppool DefaultAppPool /xml | appcmd list app /in /xml | appcmd delete app /in

12. Move all applications in a site to NewAppPool apppool
appcmd list app /site.name:”Default Web Site” /xml | appcmd set app /in /applicationPool:NewAppPool

13. List all sites with “/test” app
appcmd list app /path:”/test” /xml | appcmd list site /in

14. List apps created by user10 (assuming all his apps under a folder whose name contains user10)
appcmd list vdir /physicalPath:”$=*user10*” /xml | appcmd list app /in

15. List sites which read from C:\inetput\wwwroot
appcmd list vdir /physicalPath:C:\inetput\wwwroot /xml | appcmd list app /xml /in | appcmd list site /in

16. List the vdirs of sites which are stopped
appcmd list site /state:stopped /xml | appcmd list app /xml /in | appcmd list vdir /in

Worker processes and Requests
17. Stop apppools of requests running for more than 60 seconds
appcmd list request /xml /time:”$>60000″ | appcmd list apppool /in /xml | appcmd stop apppool /in

18. List apps served by wp 3600
appcmd list wp 3600 /xml | appcmd list apppool /xml /in | appcmd list app /in

Modules
19. Disable all managed modules
appcmd list module /preCondition:managedHandler /xml | appcmd delete module /in

20. Uninstall all native modules
appcmd list module /type:”" /xml | appcmd uninstall module /in

21. Unlock all module entries under system.webServer/modules (won’t work on vista)
appcmd list module /xml | appcmd set config /lockItem:false /in

Configuration
22. Keep config of a particular section and restore later
appcmd list config http://localhost/app1/ /section:caching /xml /config > config.xml
appcmd set config http://localhost/app1 /in < config.xml

Backups and Traces
23. Delete all backups
appcmd list backup /xml | appcmd delete backup /in

24. List sites generating 404
appcmd list trace /statusCode:404 /xml | appcmd list site /in

Content copied from :http://blogs.iis.net/ksingla/archive/2007/06/17/things-you-can-do-by-piping-appcmd-commands.aspx

14Jan

openvz on debian amd64

No comments

echo “deb http://download.openvz.org/debian-systs lenny openvz ” >> /etc/apt/sources.list

wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - && apt-get update

apt-get install vzctl vzquota

edit /etc/sysctl.conf : set net.ipv4.ip_forward=1

ln -s /var/lib/vz /vz

apt-get install vzctl-ostmp-debian-5.0-amd64-minimal

apt-get install vzprocps

put into /etc/vz/vz.conf : IPTABLES=”ip_tables ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_LOG ipt_conntrack ipt_helper ipt_state iptable_nat ip_nat_ftp ip_nat_irc ipt_TOS”

Categories: bg-webs.com Clients
28Dec

grep - syntax and options reference quick guide

No comments

GREP::: quick syntax and options reference guide

grep basically searches.

shell> grep foo
file(s)

shell> grep foo
*

returns all the lines in file(s) that contain a string matching
the expression “foo” (which may be a regular expression).

Another way of using grep is to have it accept data through STDIN
and filter to STDOUT. For example,

shell> ls
|grep blah

lists all files in the current directory containing the string “blah”

Some common option:

-v - invert (print
all lines except those that contain the pattern).

-i - ignore case
of letters (small and capital treated as the same)

-l - (list) -
print a list of the file names where mathes found

-s - suppress error
messages about nonexistent or unreadable files.

-c   - print only a count of the lines that  contain
the pattern.

-n   - precede each line by its line number  in
the file (first line is 1).

-h   - prevents the name of the file containing  the
matching  line  from  being  appended to that line
(used when searching multiple files).

-w  - search for the expression as  a  word  as
if surrounded by \< and \>.

Read the rest of this entry »

11Nov

ssh port forward - quick howto syntax it

No comments

scenario 1 : attach remote private host on localhost and localport

/localhost -> sshserver -> sshserverlocalnet_host/

ssh user@sshserver  -L 1180:sshserverlocalnet_host:80

The sshserverlocalnet_host, port 80 will be attached on localhost and localport 1180

17Sep

FreeBSD portupgrade missing key: categories: Cannot read the portsdb! SOLUTION!!!

No comments

when the error is like this:

# portupgrade phpMyAdmin

[missing key: categories] [Updating the portsdb
in /usr/ports ... - 20687 port entries found .........1000.........2000.........3000.........4000.........5000.........6000.........7000.........8000.........9000.........10000.........11000.........12000.........13000.........14000.........15000.........16000.........17000.........18000.........19000.........20000...... ..... done]
missing key: categories: Cannot read the portsdb!
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:567:in `open_db’: database file error (PortsDB::DBError)
from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:736:in `port’
from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:924:in `all_depends_list’
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:915:in `tsort_build’
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `each’
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:907:in `tsort_build’
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:929:in `sort_build’
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:933:in `sort_build!’
from /usr/local/sbin/portupgrade:694:in `main’
from /usr/local/lib/ruby/1.8/optparse.rb:755:in `initialize’
from /usr/local/sbin/portupgrade:210:in `new’
from /usr/local/sbin/portupgrade:210:in `main’
from /usr/local/sbin/portupgrade:1981
Read the rest of this entry »

Categories: Problem Solutions
09Sep

Skype protocol, skype connect algorithm, authentication servers and ports

No comments

Original from WikiPedia

Here because I dont wonna a forget it.

Protocol

A Skype network is a peer-to-peer network with three main entities: supernodes, ordinary nodes and the login server. It is an overlay network: each client builds and refreshes a list of reachable nodes known as the host cache. The host cache contains IP address and port numbers of supernodes. Communication is encrypted using RC4; the method used does not provide any privacy but instead merely obfuscates the traffic.

So, abbreviatures for host cache is HC , Skype Client is SC and Skype Network is SN

Read the rest of this entry »

26Aug

Asterisk 1.4 tunning tips and shits

No comments

IP Type Of Service settings:
——————————————-
sip.conf tos_sip cs3
sip.conf tos_audio ef
sip.conf tos_video af41
——————————————-
iax.conf tos ef
——————————————-
iaxprov.conf tos ef
===========================================

Categories: VoIP
25Aug

Asterisk SIP Response Codes

No comments

a list.
1xx: Provisional — request received, continuing to process the request;
Provisional responses, also known as informational responses, indicate that the server contacted is performing some further action and does not yet have a definitive response. A server sends a 1xx response if it expects to take more than 200 ms to obtain a final response. Note that 1xx responses are not transmitted reliably. They never cause the client to send an ACK. Provisional (1xx) responses MAY contain message bodies, including session descriptions.
2xx: Success — the action was successfully received, understood, and accepted;
3xx: Redirection — further action needs to be taken in order to complete the request;
4xx: Client Error — the request contains bad syntax or cannot be fulfilled at this server;
5xx: Server Error — the server failed to fulfill an apparently valid request;
6xx: Global Failure — the request cannot be fulfilled at any server.

Read the rest of this entry »

Categories: VoIP
25Aug

Nokia N95 connect SIP to asterisk

No comments

Fast and easy you can connect your Nokia N95 gsm to asterisk PBX.

( it’s work with almost all Nokia cell phones )

Go to Tools / Settings / Connection / SIP settings
Create new profile …
Profile name: stolitel
Enter name for your SIP profile.
Service Profile: IETF Default
Do Not change this.
Default Access Point: ( your WIFI AP name -> find it in Tools / Settings / Connections / Wireless LAN )
Choose the access point name.
Public User Name: 1000@sip.stolitel.net
Fill your username and @your registar server address.
Use Compression: No
Do Not Change this.
Registration: “Always on ”
Do Not Change this.
Use Security: No
Do Not Change this.
Proxy Server: none
Do Not Enter in this setting menu.

Registrar Server .-> Enter to edit this setting menu.

Registrar Server address: sip.stolitel.net
Enter your Server address.
Realm: asterisk
Do Not Change This unless there is realm: in server’s sip.conf
User Name: 1000
Enter your SIP username.
Password: password
Enter your SIP password.
Transport Type: UDP
Do not change or change it to UDP.
Port: 5060
Do not change OR enter your registar server SIP connection port.

Now your gsm phone is a gsm and VoIP phone in the same time.
When you want to call via VoIP , just enter the calling number, hit Options -> Internet Call

Categories: VoIP
24Aug

Asterisk on FreeBSD: install, configure and run. command line examples.

No comments

First we get and install the asterisk package file.

#cd /usr/porta/net/asterisk
#make install asterisk clean clean-depends

…………………………………………………………………………………..
INSTALLING…….( , If you exit with an error, just fix it and continue. )
………………………………………………………………………………..

and we love pkg worlds! :)

Categories: VoIP