Reason I was trying to benchmark a TCP based file server on Mac OS X. The server is running latest Node.js (0.8.2), while the client to push the server is written in go. ‘Go’ can start thousands of concurrent goroutines easily. I got error when there are hundreds of concurrent clients. Steps increate max open files kern.maxfiles and kern.maxfilesperproc were small numbers, they need to be increased: after this, you can increase your account’s limit by ulimit -n:
In this post, I summarized how to config VMware Fusion 2’s network. For the new VMware Fusion 3, it’s much easier. VMware Fusion 3 has a separate configuration file for networking only. The file is: /Library/Application Support/VMware Fusion/networking A sample file as following: VERSION=1,0 answer VNET_1_DHCP no answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 answer VNET_1_HOSTONLY_SUBNET 172.16.125.0 answer VNET_1_VIRTUAL_ADAPTER no answer VNET_1_VIRTUAL_ADAPTER_ADDR 172.16.125.1 answer VNET_8_DHCP no answer VNET_8_DHCP_CFG_HASH E7EBB6E40048285A05D25835904AFD8BEC1CD2B2 answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 answer VNET_8_HOSTONLY_SUBNET 192.
lsof can list all open files in osx. As directories, sockets are all also files in unix. lsof can also be used to find open ports/sockets/directories: To list all open TCP sockets with port numbers: sudo lsof -i -P To find processes open a folder or any file in that folder sudo lsof +D /the/foler To find process open any file on a dev sudo lsof /dev/disk0s2 To print all found process id only sudo lsof -t <other commands> Details can be looked up in the man page.
Currently, SL does not boot in 64 bit mode by default. You can check it by running “uname -a” in terminal. To boot it in 64 bit, press 6 and 4 while booting or set the nvram: $ sudo nvram boot-args=“arch=x86_64” In 64bit mode, the kernel will run with architecture of x86_64. So it loads only x86_64 kexts. Which means CiscoVPN and VMware Fusion’s kexts won’t load. If you need CiscoVPN and VMware Fusion like me, you need to switch back to 32bit kernel by this command:
VMware Fusion does not include a network configuration tool like in Windows. But it does not mean you cannot config it. When the system starts, it will load the plist file of /Library/LaunchDaemons/com.vmware.launchd.vmware.plist, which will call the script boot.sh under /Library/Application Support/VMware Fusion/ <dict> <key>Label</key> <string>com.vmware.launchd.vmware</string> <key>ProgramArguments</key> <array> <string>/Library/Application Support/VMware Fusion/boot.sh</string> <string>–start</string> </array> <key>RunAtLoad</key> <true/> </dict> So, let’s look into the boot.sh. boot.sh supports 3 commands: –start, –stop and –restart.