%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpErrors -errorMode:Detailed|DetailedLocalOnly|Custom
Analyzing Apache Log Files
List Client IP and Count Hits
awk -F'[ “]+’ ‘$7 == “/” { ipcount[$1]++ } END { for (i in ipcount) { printf “%15s – %d\n”, i, ipcount[i] } }’ access.log
List Client IP and RDNS
cat access.log | awk ‘{print $1}’ | logresolve
How to Determine Database Role Permissions
This SQL statement will show all the permissions of a particular role:
use YourDBName
go
select dp.NAME AS principal_name,dp.type_desc AS principal_type_desc,
o.NAME AS object_name,p.permission_name,p.state_desc AS permission_state_desc
from sys.database_permissions p
left OUTER JOIN sys.all_objects o
on p.major_id = o.OBJECT_ID
inner JOIN sys.database_principals dp
on p.grantee_principal_id = dp.principal_id
where dp.NAME=’YourDBRoleName’
Thanks to Mike Warner
Explanation of Classic vs. Integrated mode in IIS 7.x
Installing packages in Ubuntu from cdrom (no Internet)
In many cases, the dev class vm’s do not have Internet access (annoying) so you cannot install software vi the Internet.
Mount the ISO in the VM.
On the server run the following command:
sudo mount /dev/sr0 /cdrom
ensure that only the following line is uncommented in /etc/ap[t/sources.list
deb cdrom:[Ubuntu-Server 10.04 LTS _Lucid Lynx_ – Release amd64 (20100427)]/ lucid main restricted
Run sudo apt-get update to update the repository. Then install what you need.
Magento Enterprise Edition – Content Staging and Merging
List loaded Apache modules
# apache2ctl -t -D DUMP_MODULES
A wrapper for grabbing performance info from Nagios plugin
check_procs is an example for a plugin which doesn’t deliver performance data:
./check_procs -a apache2 -w 1: -c 0:
PROCS OK: 33 processes with args ‘apache2’
This can be changed with the following wrapper script:
#!/bin/bash LINE=`/usr/local/nagios/libexec/check_procs $*` RC=$? COUNT=`echo $LINE | awk '{print $3}'` echo $LINE \| procs=$COUNT exit $RC
Now you’ll get the number together with the required label:
PROCS OK: 33 processes with args ‘apache2’| procs=33
SeleniumHQ Server on Nagios/Linux Host
These commands are tailored for a nagios installation.
Starting the selenium rc:
Sample nagios check command:
./check_selenium com.example.tests.someWebsiteCom http://some.website.com*firefox
Schedule:
Currently, login test is every hour.
TF221161: There are conflicting definitions of the following work item fields in the warehouse
This is the error message in the Application Event Log on tfsserver:
Source: TFS Services
Date: 1/10/2011 2:04:39 PM
Event ID: 3300
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: TFSSERVER
TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 1/10/2011 7:04:39 PM
Machine: TFSSERVER
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Service Host:
Process Details:
Process Name: TFSJobAgent
Process Id: 1924
Thread Id: 7972
Account name: DOMAIN\TFS_Service
Adapter: Microsoft.TeamFoundation.WorkItemTracking.WorkItemTrackingWarehouseAdapter
Team Project Collection: sitename
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event“>
<System>
<Provider Name=”TFS Services” />
<EventID Qualifiers=”0″>3300</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2011-01-10T19:04:39.000000000Z” />
<EventRecordID>23554</EventRecordID>
<Channel>Application</Channel>
<Computer>TFSSERVER.DOMAIN.local</Computer>
<Security />
</System>
<EventData>
<Data>TF53010: The following error has occurred in a Team Foundation component or extension:
Date (UTC): 1/10/2011 7:04:39 PM
Machine: TFSSERVER
Assembly: Microsoft.TeamFoundation.Framework.Server, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Service Host:
Process Details:
Process Name: TFSJobAgent
Process Id: 1924
Thread Id: 7972
Account name: DOMAIN\svcTFS_Service
Adapter: Microsoft.TeamFoundation.WorkItemTracking.WorkItemTrackingWarehouseAdapter
Team Project Collection: ewholesale
</EventData>
</Event>
Following this document on MSDN:
http://msdn.microsoft.com/library/ee921480(VS.100).aspx
Open the VS command prompt and run the following:
witadmin listfields /collection:http://xxxxxx:8080/tfs/sitename