りおてくでタグ「Mac」が付けられているもの

MacBookにSnow Leopardを入れたんだが、かなり色々速いぞ、これ。Finderの動作にしてもSafariにしても、動作がキビキビした印象。特にマシンの終了が一瞬なんだけど...。メインのマシンも入れ替えたいなぁ。

不機嫌な Mac。Apple製品に関しては、りおは運が良いのか「よく故障する」というイメージは全く無いんだよね。周囲には「壊れやすい」というイメージを持っている人が少なからずいるんだけど、使い方によるのか、この文にもあるように(主に)第二世代を買っているからなのか。

CD-ROMのISOファイルが複数あって、Mac OS X Leopard上で一気に串刺ししたいとき。

件名の通り。「書類」とか「共有」が表示されているんだけど、それらを全部削除して、特定のフォルダだけがDockに表示されるようにしておきたい。

/Library/Managed\ Preferences/user/com.apple.dock.plistを編集すればオッケー。

と思ったら、ユーザをスイッチする時に上書きされる...。うーん。

I wrote the entry about the difficulty that globalSAN doesn't have any command line interfaces. In short, we can't connect / disconnect to / from an iSCSI target by a script. And I found that globalSAN uses Mach API for messaging. But it's very difficult to imply a method to control the globalSAN daemon.

I gave up on connecting and disconnecting by my script and switched to mounting and unmounting when I want. When a Mac is restarted, Mac OS's autofs mounts an iSCSI volume automatically. But as I wrote yesterday, it can destroy the filesystem on the volume where multi-Mac are used. I found the way to prevent autofs from mounting the volume automatically.

$ sudo vifs
UUID=01234567-89AB-CDEF-0123-456789ABCDEF none hfs rw,noauto

Now, I can mount and unmount the volume safely with locking system by my script when I desire to do so.

前回の続き。ちょっと広く情報を集めたいので、へたくそ英語で。

I've used globalSAN as an iSCSI initiator. But I happened on a difficulty that globalSAN doesn't have any command line interfaces, CUI. In case of using an iSCSI volume for rsync with multiple-Mac, you need to obey a procedure as follows.

  1. Check that other Mac aren't mounting an iSCSI volume
    To check if the volume isn't mounted, there should be some 'locking system' on web server or something.
  2. Mount the volume
  3. Issue rsync command targeting the volume
  4. Unmount the volume

To avoid destroying a file system on the volume, globalSAN Preference Pane needs to be configured without 'persistent'. If not, when one of your Mac is restarted, globalSAN connects to the volume and HFS+ can be broken.

The problem I face with is absence of command line to connect to an iSCSI target.

Firstly, I tried Apple Script. But my attempt resulted in failure. Because globalSAN Preference Pane doesn't support AS. And Automator.app is similar.

Then I found that Console.app reported some messages when I checked 'connect' checkbox in globalSAN Preference Pane.

09/03/03 23:15:26 System Preferences[187] ConnectTarget, connectionDict: {
    "Selected Addresses" =     (
    );
    "Target Address Settings" =     {
        1 =         (
                        {
                "Target IP Address String" = "rio.tc";
                "Target IP Port Number" = 3260;
                "Target Portal Group Number" = 1;
            }
        );
    };
    "Target Login Settings" =     {
        "Data Digest Enable" = 0;
        "Header Digest Enable" = 0;
        "Target Login Credentials" =         {
            "Authentication Type" = CHAP;
            "CHAP Initiator Name" = hogehoge;
            "CHAP Initiator Password" = hogehoge;
            "CHAP Target Name" = "";
            "CHAP Target Password" = hogehoge;
        };
    };
    "Target URL" = "iqn.2009-01.tc.rio:storage.iscsi";
} 

To be precise, globalSAN consists of three components, a kernel extension, a preference pane and a globalSAN daemon. I guess that the preference pane send a message to the daemon configuring the kernel extension. The structured data reported by Console.app is considered as a message sent by the preference pane to the daemon.

UNIX domain socket is the well-known mechanism for IPC. However, I couldn't find the socket bound by globalSAN daemon with netstat command.

When I was about to give up, I found that Activity Monitor.app had a feature to gather system calls.

Sampling process 3348 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling globalSAN (pid 3348) every 1 millisecond
Call graph:
    2363 Thread_2507
      2363 start
        2363 _start
          2363 main
            2363 RunService()
              2363 CFRunLoopRun
                2363 CFRunLoopRunSpecific
                  2269 mach_msg
                    2269 mach_msg_trap
                      2269 mach_msg_trap
                  93 __CFMachPortPerform
                    93 __NSFireMachPort
                      91 -[NSConcretePortCoder dispatch]
                        91 -[NSConnection handlePortCoder:]
                          91 -[NSConnection handleRequest:sequence:]
                            90 -[NSConnection dispatchInvocation:]
                              90 -[NSInvocation invoke]
                                90 __invoking___
                                  90 _CF_forwarding_prep_0
                                    90 ___forwarding___
                                      90 -[NSInvocation invokeWithTarget:]
                                        90 -[NSInvocation invoke]
                                          90 __invoking___
                                            90 -[SNSISCSIServer targetConnect:results:]
                                              90 -[SNSISCSIServer openSingleConnectionToTarget:withSettings:withAddress:results:]
                                                89 IOConnectMethodStructureIStructureO
                                                  89 IOConnectCallMethod
                                                    89 io_connect_method
                                                      89 mach_msg
                                                        89 mach_msg_trap
                                                          89 mach_msg_trap
                                                1 +[NSPropertyListSerialization dataFromPropertyList:format:errorDescription:]
                                                  1 CFPropertyListWriteToStream
                                                    1 CFPropertyListCreateXMLData
                                                      1 _CFGenerateXMLPropertyListToData
                                                        1 _CFAppendXML0
                                                          1 _plistAppendCharacters
                                                            1 CFDataAppendBytes
                                                              1 CFDataReplaceBytes
                                                                1 CFDataReplaceBytes
                            1 -[NSConnection returnResult:exception:sequence:imports:]
                              1 -[NSConcretePortCoder sendBeforeTime:sendReplyPort:]
                                1 -[NSMachPort sendBeforeTime:streamData:components:from:msgid:]
                                  1 +[NSMachPort sendBeforeTime:streamData:components:to:from:msgid:reserved:]
                                    1 mach_msg
                                      1 mach_msg_trap
                                        1 mach_msg_trap
                      2 +[NSMachPort parseMachMessage:localPort:remotePort:msgid:components:]
                        2 NSAllocateObject
                          2 _internal_class_createInstanceFromZone
                            2 malloc_zone_calloc
                              2 szone_calloc
                                2 tiny_malloc_from_free_list
                                  2 tiny_malloc_from_free_list
                  1 CFRunLoopRunSpecific

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        mach_msg_trap        2359
Sample analysis of process 3348 written to file /dev/stdout

O.K. I know that globalSAN uses Mach API to send message :)

前回の続き。
Time Machine for every Unix out there - IMHO。rsyncでTime Machineがやっていることを真似してみようという話。参考にはなるんだが、このままではいくつか問題が。

複数のMacを使い始めると、ちょっと困ったことが。
もちろん、MobileMeなんかじゃ全然ダメなのでアイデアを覚え書き。

ビデオ:Mac「1984」CM --今なお衝撃的な映像を振り返る。最近、にわかマカーが増えてきたので、このCM、あるいはMacintosh登場のショックを知らないんだろうなと改めて思ったり。

Techinsight » <パソコン快適活用術>WindowsとMacとLinuxのいいとこ取りしてWindows7をカスタマイズする。できあがったものをみると、結局Mac OS Xに全部あるものじゃないの、これ。最初からMac OS Xを使えば良いじゃん。

Mac isLand:ダイワボウ情報システム初のMacオンリー展示会が開催 - MACお宝鑑定団 blog。へぇー、そんなのをやってるのね、知らなかった。ちょっと見に行きたかったな。

アップルMacBook Wheel発表、キーボード非搭載。20万ぐらいだったら売れるかな(笑)。

Leopardが走るネットブック、最新モデル別に自作対応度チャートを大発表。DellのInspiron Mini 9のUbuntu搭載モデルに32GBのSSDと2GBのメモリを載せるとちょうど5万円ぐらい。重さ1キロのMac OS X搭載モデルは無いので、これが良いかも。

LinuxがMac OS Xよりも優れている10のこと - IT業界を生き抜く秘密10箇条 - ZDNet Japan。どっちのOSも、まあそれなりに詳しい自分に言わせると、この記事を書いたやつは何も分かってないな、と。釣りだという可能性はあえて無視して、突っ込もう。

sysctlに関して調べていて、Mac OS Xに関する記述を見つけた。かなり速くなった...。

sudo cat /etc/sysctl.conf 
Password:
sysctl -w net.inet.tcp.sendspace=4000000
sysctl -w net.inet.tcp.recvspace=4000000

アップル、MSのマーケティング戦略を皮肉った新CMで反撃。Appleのマーケって天才的だよな、本当。文の最後に

だが、Appleが新しいOSの投入でへまをするようなことが起こらないように祈る。

とあるけれど、Snow Leopardは失敗しないと思うな。

アップル、Cocoaベースの「Finder」を完成か--Snow Leopardの準備着々

Mac OS Xになって、新バージョンが旧バージョンより、リリース直後に不安定だったことはあるけれど、全体として改悪されたことは無いと思うし。

Macユーザーは「人と違ったことが好き」、Windowsは「普通が好き」。とても面白いと思ったのは、Macユーザーは海外が好きで国際情勢に興味があり英語学習に関心がある。好きな自動車メーカーがホンダ、ってところ。はまりまくり(笑)。

Windowsより割高なMac、シェア拡大のカギは値下げ

6月の平均的なWindowsのノートPC販売価格は、およそ700ドルだったのに対して、AppleのノートPCの平均販売価格は、実に1515ドルだった

...。「平均」って何?
「トヨタの平均車両価格は200万円だったが、ポルシェは1000万円だった」って意味あるのか?
ラインナップの仕方が違うんだから、平均なんて意味ないだろ。

まあ、Windows PCじゃMac OSは動かないけど、MacならMac OSとWindowsと動くしな。

【解説】「なくした"人生の一部"を取り戻せ」――オープンソースのノートPC追跡ソフト「Adeona」が完成。MacBookだとiSightが付いているので、with photo enabledのバージョンを入れてみた。使い方が分かっていないといざという時に役に立たないので、メモっておく。

Macのシェア、急速に拡大中--Vistaは振るわず。どちらかといえば、自分が買っている台数よりも人に買わせている台数の方が圧倒的に多いりおとしては、あまり気にならない問題ではあるけれど、世の中みんなMacになっちゃうのはそれはそれでおもしろくないかもね。とはいえ、まだ8%ですから。

タグ