![]() |
Making Unix Command Stick
After looking around in my Power Mac manual, the manual states that when auto-detecting network connection speeds, it defaults to half-duplex. My cable provider does not have auto-detecting switches/hubs, but ensured me that their service is full-duplex, not just half. I have tried using full-duplex, on both my Athlon and Quicksilver, and there is indeed full-duplex. No collisions at all.
So, I would like to enable full duplex throughput on my Mac, thereby increasing my transfer speeds (it seems whenever I am transferring one way [up or down] if I try to start another transfer the other way, it never gets past 4K/s.) I already know now to set full duplex on my machine. # sudo ifconfig en0 media 10baseT/UTP mediaopt full-duplex However, I am not one who enjoys entering this long string in every time I start up in OS X. How do I make the system execute this command upon startup, and without having to pause my system to enter in an administration password? Thank you. |
One of the experts will have to tell you exactly which startup-file to put the command in, but you can edit one of them to add this to the start-up routine. I think /etc/rc is the file you want, but wait for a second opinion before you change it. Also, when you change it, make a copy call "old.rc" or something so you have an original should problems arise.
|
you could try this...
vi /Library/StartupItems/fullDuplex
in that file put your line: sudo ifconfig en0 media 10baseT/UTP mediaopt full-duplex chown root /Library/StartupItems/fullDuplex chgrp wheel /Library/StartupItems/fullDuplex chmod 700 /Library/StartupItems/fullDuplex reboot your computer once rebooted test with: ifconfig -a |
NOTE: Just to be clear, after you enter your line,
Code:
sudo ifconfig en0 media 10baseT/UTP mediaopt full-duplexCode:
chown root /Library/StartupItems/fullDuplex |
vi?
Can I do this in pico by any chance? I don't like vi.
Quote: vi /Library/StartupItems/fullDuplex I assume this makes a fullDuplex file in the StartupItems folder, not a folder? |
Yes, pico is OK and yes, it makes a file.
Code:
pico /Library/StartupItems/fullDuplex |
How dare you tell someone that pico is Ok compared to vi. ;)
|
vi is for the true uber-geek nerdy type people (he he he :D )
I like pico. Nice and simple. |
None of the hints above worked.
I am currently going into my BroadbandOptimizer file and editing that. Perhaps that will work it. Also, editing my BroadbandOptimizer file and seeing the results in ifconfig -a, I show this. (This is somewhat promising, yet disheartening.) Code:
[localhost:~] avu% ifconfig -a |
^^
|
Code:
% ifconfig -aYours is set to try 10 full but is falling back to 10 half. At least that is my take on it 8-) |
Creating a startup item (a command that will execute when the machine is booted) is a little more involved than discussed above. Here's how it's done:
http://www.opensource.apple.com/proj...ter_HOWTO.html Or you could just paste this: #! /bin/sh sudo ifconfig en0 media 10baseT/UTP mediaopt full-duplex in an an executable file that ends in ".command" as in "testscript.command" and then drop that file into your Login Items in the system prefs. It will launch a Terminal window when you log in, and you'll be prompted for your password, but that might be easier than creating a startup item. |
That's the thing. I don't want a terminal window popping up. I just want my system to automatically read the entry I made in BroadbandOptimizer and set my network to 10baseT/UTP full-duplex.
But I'm happy. The Oilers beat the Red Wings 4-3 tonight. Wheee! |
Quote:
|
Plays "Zombie Nation" (the Oilers goal song)...
Boo yah... 2-0-1 against the mighty Red Wings this year. Oh yeah. BTW, how do I make full-duplex stick? |
Quote:
For example, when I needed to make sure a license server (for macromodel or sybil, whatever) would automatically start up and was available for all users on the machine, I would find the "rc" script that was last to run on (re)boot, and insert the appropriate shell command near the end. I haven't had to do this on the OS X box yet, but I know there is at least one rc script that runs at boot time. The advantage to doing it this way is that it happens on reboot and is sytem wide...the users don't need to worry about anything, and you don't have to call a script each time you log in. You also don't have permission problems because root executes the command. The disadvantage is that you are messing with the boot process so it can be intimidating (and potentially frustrating to trouble shoot). Look at the file /etc/rc and see if it looks like you can insert it near the end. Again, I will say that you should make a copy of the original rc script in case you need to replace it. Merv, if you read this, let me know if I'm being a moron here. Darwin, with little exception, is not Irix ... so the details may be wrong here. I suspect they are not, though. PS: An Oilers fan I can live with. If you were a Stars fan or an Avalanch fan we might have some problems. :) I don't like the Islanders either but that is more because of an obnoxious room-mate my freshman year at college. I should probably get over that. :D |
Quote:
i think the broadband optimizer approach is better; same results and less to manage on OS upgrades. |
But the BBOptimizer approach doesn't work either.
I don't really wanna fudge with the rc thing (sounds deadly). BTW, being an Oilers fan, you know how much I hate the Stars. Eugh... I grew up on Gretzky, Kurri, Messier, Semenko, Moog, Fuhr, Linesman, Coffey, Lowe, MacTavish and Craig Simpson. I couldn't name another team as dominating as the Edmonton Oilers of the 80s. |
The OS X way is via StartupItems. Take a look in /Library/StartupItems/ and see if there are any items there that you can use as an example. This link also gives an example:
http://www.greasydaemon.com/macosx/macfirewall/ or just search here for 'StartupItems' and you should get a bunch of hits. |
Quote:
/Library/Startup seems like an interesting way to do the same thing. BTW, I was living in Austin when the Stars won the cup. Dang I hated having to listen to the people, who thought they knew hockey, go on about their goons in Dallas. Now I'm in Atlanta with the Thrashers. 'Nuff said. Thank God I'm moving to MN this summer! |
I like Atlanta solely on the fact of Bob Hartley and Dany Heatley. But they need some more decent people other than Heatley and Kovalchuk.
BTW, I don't really like Kovalchuk, as don't most of the other players in the league. He is cocky. Whenever he scores, he takes the ice off of his gloves and leaves it near the opposing bench. That's why I was happy when Comrie fought him. Little punk, I say. So how do I install the sudo ifconfig en0 media 10baseT/UTP mediaopt full-duplex thing again?!? |
| All times are GMT -5. The time now is 05:36 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.