Slow filetransfers between windows 2008 and windows XP, what could it be…?

Just discovered why our file transfers are soooo slow: seems like there is an incompatibility between windows XP SMB 1 and windows 2008 SMB 2. Would expect anything else from a microsoft product. It just tells the clients that the file isn’t there while it is :(

Discovered it with my newly discovered sniffer tool tshark:

tshark -i em2 host <fileserverIP> | grep -B 1 "STATUS_OBJECT_NAME_NOT_FOUND" | 
grep "Path:"

Anyone solved this one yet?

Example to remove text before word in a line

The following command strips text before a word in a line. You can replace the word with something else:

sed ‘s/^.*StripBefore:/WillBecome:/’

Example:

tshark -i em2 host 192.168.1.1 | grep Path | sed 's/^.*Path:/Dir:/'

With output:

0.000000 192.168.2.1 -> 192.168.1.1   SMB 252 Trans2 Request, QUERY_PATH_INFO, 
Query File Basic Info, Path: \Groups\Staff\importantFile.doc

Will become:

Dir: \Groups\Staff\importantFile.doc

(This command will show all files accessed on the fileserver 192.168.1.1 ;-)

Count the number of occurrences of a word in a textfile

cat logfile.txt | grep <CountThisWord> | wc -w

Replace <CountThisWord> with your search text!