How to view active services via terminal e.g. status of AFP etc...

Hi : )
How do I view whether AFP is enabled or not via the terminal?
I thought I could view /etc/hostconfig to get the answer when logged in via e.g. SSH. But in Leopard running the following terminal command:
cat /etc/hostconfig | grep "=\-" | sort
Always shows AFPSERVER as NO whether or not file sharing is turned on or not.
At the top of this file, it says #this file is going away. So I'm guessing there is another / better way to view this.
Hunting around a bit, I found that if I:
netstat -a
and filesharing is running, there are two entries *.afpovertcp and *.afpovert in the output.
tcp4 0 0 *.afpovertcp . LISTEN
tcp6 0 0 *.afpovert . LISTEN
Turning off filesharing removes these from netstat.
Doing the above command takes a few seconds to get a result as it seems to poll a whole range of different services and protocols, which as I'm calling this from a script I don't have time for, so if I:
netstat -a -f inet6 | grep afp
I get a near instantaneous result of:
tcp6 0 0 *.afpovert . LISTEN
if filesharing is turned on and null if it is turned off.
Can anyone point me in a different direction? Is there another way? Or is this as good as any?
Thanks...

Actually, after further review, this method doesn't work as it only returns the last log entry for AFP status rather than the current status.
E.g. the last log entry could be AFP Control: AFP Error but if the computer is then restarted, AFP Control doesn't get logged in the system log on restart. Hence the egrep command still returns: AFP Error, when in fact AFP is actually enabled and running.
Hence back to my original question! anyone know a way to view if FileSharing is currently active via the terminal, even when there are no connected users other than:
netstat -a -f inet6 | grep afp
and looking for:
tcp6 0 0 *.afpovert . LISTEN
as the result??? Or is this a reliable method? i.e. if afpovert is present is that a hard and fast way of discovering filesharing is enabled?
Message was edited by: cjcj

Similar Messages

  • How to assign Static IP via Terminal in Mountain Lion OSX?

    I have formatted by Macbook Pro 13 inch (2009 Oct) running on Mountain Lion OSX. I am trying to install the OSX via Ethernet at office network but I am unable to do so due to network restrictions. Macbook Pro picks the IP automatically when connected over Ethernet.
    In order to install the OSX over the same network I have to configure the Macbook to static IP (public netowork). Could you please guide me how to configure Static IP via Terminal? I mean the commands to feed in Terminal. Thanks!

    First get a list of your network services:
    networksetup -listallnetworkservices
    Then use the desired service name in the following command:
    networksetup -setmanual SERVICE IP SUBNET ROUTER
    For example, by default the Wi-Fi connection will be called "Wi-Fi," so you can use the following to set it to a classic private IP address:
    networksetup -setmanual Wi-Fi 192.168.1.2 255.255.255.0 192.168.1.1
    To set it back to DHCP, use the following command:
    networksetup -setdhcp SERVICE
    To keep DHCP services but only use a manually designated IP address, then use the following command:
    networksetup -setmanualwithdhcprouter SERVICE IP
    You may need to preceede these commands with "sudo" (followed by a single space) to run them with administrative privileges.

  • 'Services.exe Terminated Unexpectedly with status code 128' on  SAP server

    get message 'Services.exe Terminated Unexpectedly with status code 128' on SAP Server when start windows 2000. & SAP server shut down

    Hi,
    Please check the link below.
    http://support.microsoft.com/kb/318447
    Rgds,
    Suman

  • How to view web service definition details using Netweaver ?

    Hi,
    I have installed Netweaver 7.01 trial version, and I have seen using the Web Service Browser, that all BAPI's are exposed as web services already. I would like to view the web service details for some of these BAPI's, in order to understand the authentication, authorization details for these as I plan to try and call these through java.
    I basically want to understand whether they are using BASIC authentication by default or configured to use something else.
    Any guidance on this is appreciated.
    thx,
    -Kev.

    Did you try unpublishing it ...
    HOW CAN I DELETE SERVICES IN THE SERVICES REGISTRY?
    The concept of the Services Registry sees the content of the registry as a mirror of the various backend systems from which you publish into the registry. To ensure consistency, you should not manually delete service definitions from the registry, but instead it is recommended to use the publication rules functionality of SAP NetWeaver Administrator (Java) and SOA Manager (ABAP) to u2018unpublish' service definitions that are no longer required.
    However, if you still need to delete service definitions, you can make use of the corresponding API and manually remove service definitions.
    from the following link ...
    /docs/DOC-8782#section172 [original link is broken]
    Regards
    M

  • How to view user name in terminal

    i forgot my user id and password my macairbook which i brought yesterday can someone help me how reset my credentials through safemode??

    You don't want Terminal or Safe Mode.
    Read the support doc here and follow the instructions:
    http://support.apple.com/kb/HT1274

  • How to Use calendar service via internet not intranet

    Hello:
    I wanted to know if there is any change or stuff (like proxy web server) to use the calendar via Internet.
    i.e.
    i access the calendar on my networ througth http://hostname.domainname.com:portnumbre.
    When i try to access via internet therougth www.domainname:portnumer, it cannot be accesible.
    What are the procedures, by the way i have used the evaluation senario for this.
    Thanks in advice.

    Hi:
    Thanks for the reply but still yet it does not fix my problem.
    Let me explain a little bit more:
    The DNS looks up to the ip so the access page can be reached, but when i try to use the service it does not work.
    So i guess i need to ad some line to ics.conf?? or something else:
    My domain internally just works fine.
    host.mydomain.com:3080
    and i access and use the clalendar
    however when outside the intranet i.e my home i use:
    www.mydomain.com:3080
    It accesses to the page where it asks me for login, but it does not authenticate. and continues asking for a user.
    That�s why i think there must be some change in the configuration or software.
    Once More
    Thanks

  • How to view a dvd via airplay

    I'm very surprised that it isn't possible to look a bought dvd via airplay on apple TV.
    In the shop they told everything what you look on the imac you can mirror via airplay and apple tv on a tvscreen or beamer!
    But it doesn't work with a simple moviedvd!
    What is Apples solution to look a simple dvd via apple TV. I mean there is a very good and a very usable technik but it is not to use to look a dvd???
    Thank you and best regards
    Michael

    It is not possible.

  • How to view JT Format via ECL Viewer ?

    Dear Experts,
       Just can view drawings( DWG) from ECL Viewer in DMS. But now I can't view JT format and message showing: it's not a valid format. Should I config something more?  I just config the same with DRW format in the program path: EAIWeb.webviewer2D.1 %SAP-CONTROL%
    BR, Albert

    Hi Athol,
       Yes. I am using display mode. As the url link below:
    http://cbg.com.tw:8080/2009-2-10-1.jpg
    Not sure why I can't use these functions: Markup/sectioning/measurement/...
    BR, Albert

  • HT4625 And how can I disable this via Terminal?

    I'd like to set the screensaver to the loginwindow. But I'm not sure. Is it save? Or are there some risks?
    And how can I disable the screensaver at the loginwindow? (I haven't got workgroupmanager.)
    Thanks for any answers

    To turn it off, use:
    sudo defaults delete /Library/Preferences/com.apple.screensaver loginWindowIdleTime
    sudo defaults delete /Library/Preferences/com.apple.screensaver loginWindowModulePath
    All other issues are covered by the article.
    (65168)

  • How to check folder sizes of the root directory on my VPS/Dedicated server via Terminal?

    Hi,
    I have following issue.
    I have a VPS with Linux OS and I'd like to check size of the folders as well as remaining space on my server.
    How can I do that via Terminal?
    I would appreciate any input.

    login into your VPS server via terminal and cd into the root of your hosted space.  Then use the df -h command to see the listing
    for i.e.
    df -h /volumes/volume_1
    Filesystem             Size   Used  Avail Capacity iused      ifree %iused  Mounted on
    //john@ds00/volume_1  457Gi   12Gi  445Gi     3%       0 18446744073709551615    0%   /Volumes/volume_1
    for you it would be something like:
    df -h [email protected]/share (ip address)

  • Send iMessages in OS X via Terminal

    Hello,
    i want to send pictures in iMessage via Terminal, Konsole / AppleScript.
    osascript -e 'tell application "Messages" to send "Hello World" to "John"'
    but there is an error:
    31:67: execution error: Messages got an error: Can’t make "John" into type buddy, text chat. (-1700)
    (John is a right contact)
    And how can I send pictures via Terminal?
    osascript -e 'tell application "Messages" to send "/pictures/pic01.png" to "John"'
    How can I tell OS X that I want to send a document and not a text?
    Thanks for your help!

    Hi,
    In the beginning iChat was AIM Only.
    Much of the AppleScript written for the app is written with this is mind.
    "picc-in-chars" are treated as Files whether they are sent as File Only with no Chat open or as Files within the Chat (which then displays the pics in most cases).
    The Auto Accept Script  may give some clues.
    It reads this for the Receipt of files and pic-in-Chats.
    To access this go to the Messages > Preferences > General section.
    At the bottom is  drop down for AppleScript with an option to show the Folder.
    This no longer displays the ~/Library/Scripts/Messages folder that Messages 7.x.x did (as did earlier version of iChat) that were used in the Alerts tab.
    If you open  the Script you can see it refers to "theBuddy" for some of the other Events.
    I am not sure this can be applied to the iMessages side of things.
    The Dictionary for Messages has this
    Your Script also appears to think you have a Pictures Folder at the top level of the Hard Drive (Along with Applications, Library, System, Users  etc.)
    Did you mean your home folder/Pictures (As In ~/Pictures)
    The Dictionary also defines "Buddies" as being related to specific Services
    this may include iMessages.
    I was once sent this script that displays  a Status messages that refers to who you are chatting with by using the name of the window (it has  section to exclued other windows)
    As text
    using terms from application "Messages"
        on av chat started
            tell application "Messages"
                set allChatWindows to every window
                set completed to false
                repeat with currentWindow in allChatWindows
                    set windowname to the name of currentWindow
                    if (not completed) then
                        if ((windowname is not ¬
                            "Audio/Video") and (windowname starts with ¬
                            "Audio" or windowname starts with ¬
                            "Video")) then
                            set status message to windowname
                            set completed to true
                        else if (windowname does not contain ¬
                            "General" and windowname does not contain ¬
                            "Doctor" and windowname does not contain ¬
                            "Activity" and windowname does not contain ¬
                            "File" and windowname does not contain ¬
                            "Accounts" and windowname does not contain ¬
                            "Messages" and windowname does not contain ¬
                            "Alerts" and windowname does not contain ¬
                            "Audio/Video" and windowname does not contain ¬
                            "Chax" and windowname does not contain ¬
                            "AIM" and windowname does not contain ¬
                            "Contacts" and windowname does not start with ¬
                            "Chat" and windowname does not contain ¬
                            "Chats" and windowname does not contain ¬
                            "Bonjour") then
                            set status message to "Audio Chat with " & windowname
                            set completed to true
                        end if
                        delay 0.2
                    end if
                end repeat
                set volume input volume 85
                delay 0.2
                set volume output volume 80
                delay 0.2
                set status to away
            end tell
        end av chat started
    end using terms from
    The end bit tweaks your volume Input and output from your regular settings.
    I hope that give you some clues.
    10:18 pm      Saturday; January 18, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Does is matter that I have mac computer & want adobe flash to view work material via citrix/windows?

    Ok... this is probably a completely ignorant computer question, but I have a macbook and have been trying now for hours to figure out how to view work training via citrix that connects me to windows explorer somehow (b/c I'm somehow connecting to my work network). So after logging into citrix & my net learning via explorer, I get a msg that states I need the latest version of Adobe flash to view the task.  So I went and downloaded the newest 11.whatever version for Mac OS 10.6 or higher and reloged in and still no luck.  So I tried restarting computer.... tried logging into citrix via safarie, firefox, and chrome.  NO LUCK.  Then it somehow dawned on me that perhaps since I'm logging into citrix/explorer, maybe I need Adobe Flash for Windows???  So I tried to do that and my computer wasn't having that and stated it encountered errors.
    So am I just chasing a lost cause???
    PLEASE HELP

    So you do a remote login to a Windows server?
    Not quite sure what you are doing with Windows Explorer; do you mean Windows Internet Explorer?
    If so, you need to install Flash Player for Internet Explorer on that Windows server.  What version is currently installed there?  See http://www.adobe.com/software/flash/about/

  • Cannot view workflow log via Services for Object Workflow Overview

    We recently had an upgrade of R3/ECC and discovered a new issue.  For some reason we can no longer view workflow log via Services for Object > Workflow Overview for Material Master (transaction MM03).  We get the message "There are no workflows that have already worked with this object".  However, we have confirmed via SWEL and other t-codes that the workflow and log do exist.  This seems to be the only object we have this issue for after the upgrade.
    Anyone know what issue is and how to fix?   Or at least path to config in SPRO for "generic object services" where we can see if anything changed via upgrade for this object?
    Thanks,
    Matt
    Edited by: Matthew Huth on Apr 22, 2008 9:23 PM

    Found the solution.  See OSS note 553246.  This has been tested and works for us.   -Matt
    Note 553246
    Summary
    Symptom
    In the material master, the system no longer displays the attachments for the material or workflow items in the Generic Object Services.
    Other terms
    MM01, MM02, MM03
    Reason and Prerequisites
    As of Release 4.6B, business object BUS1001006 is valid for the material master. Until you have implemented Note 452424, the Generic Object Services is still published for the old BUS1001 business object. After implementing the note, all attachments, relationships, notes and workflow items that are assigned to business object BUS1001 are no longer displayed.
    Instead, all new attachments are assigned to business object BUS1001006. As a result, attachments cannot exist for both systems.
    For workflow items, the assignment to the business object occurs in the respective tasks. It may be very time consuming to convert the business object, depending on whether an individual subtype (assigned to BUS1001) is created.
    In other words, after you implement the note, the workflow items for business object BUS1001 can no longer be displayed in the material master.
    Solution
    With the following correction you can call the Generic Object Services for both business objects. When it is called, the system displays a dialog box in which you can choose the required business object, that is, BUS1001 ('Material') or BUS1001006 ('Standard material').
    This correction is delivered as a modification supported by SAP only. This is because the additional option means that attachments can be maintained as required in either of the business objects and users may therefore require extra training.
    However, the corrections enable you to display attachments and workflow items for both business objects without the need for a major conversion; this means that you do not get the impression that these have been lost.
    Alternatively, as of Release 4.70 (or Basis 6.20) you can, without making a modification, implement method ADD_OBJECTS of BAdI GOS_MULT_PUBLISH for filter attribute WF_OVERVIEW ('Workflow overview'), SRELATIONS ('Relationships') and VIEW_ATTA ('Attachment list'). The implementation should be similar to the following:
    METHOD if_ex_gos_mult_publish~add_objects .
      DATA:
        ls_lporb TYPE sibflporb.
      READ TABLE ct_lporb INTO ls_lporb INDEX 1.
      if ls_lporb-typeid = 'BUS1001006'.
        ls_lporb-typeid = 'BUS1001'.
        append ls_lporb to ct_lporb.
      endif.
    endmethod.

  • Did a clean install 10.9.4. on a stock Fusion HD.  When I run "diskutil list" via Terminal, everything is wrong.  I have "EFI" and "apple Boot Boot OSX in every dev/disk** How do I fix? Any help would be much appreciated, thank you

    Did a clean install 10.9.4. on a Apple Stock 1TB Fusion Hard Drive.  When I run "diskutil list" via Terminal, everything is wrong.  I have "EFI" and "apple Boot Boot OSX" in every dev/disk**  Everything is out of place, How can I repair? Im willing too reformat if need be, however thats what I did in the first place.  Any help would be much appreciated, thank you.
    I know this cannot be correct
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *121.3 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:          Apple_CoreStorage                         121.0 GB   disk0s2
       3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:          Apple_CoreStorage                         999.3 GB   disk1s2
       3:                 Apple_Boot Boot OS X               650.0 MB   disk1s3
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Fusion                 *1.1 TB     disk2
    /dev/disk7
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                                                   *121.9 GB   disk7

    It appears as if my startup disk has been reversed and not using the fusion ssd portion as it should.  At least its now reversed as to what it used to be originally before.  the 128gb ssd used to be on top.  Is my mac booting fusion correctly?  Thank you for responding as I was about to reformat.
    CoreStorage logical volume groups (1 found)
    |
    +-- Logical Volume Group C2619AFE-0EB5-4721-8C50-3F3DBA520D1B
        =========================================================
        Name:         fusion
        Status:       Online
        Size:         1120333979648 B (1.1 TB)
        Free Space:   114688 B (114.7 KB)
        |
        +-< Physical Volume 583AAEA9-E333-4A83-9BE3-E937396E9248
        |   ----------------------------------------------------
        |   Index:    0
        |   Disk:     disk0s2
        |   Status:   Online
        |   Size:     120988852224 B (121.0 GB)
        |
        +-< Physical Volume B0C1CB16-D46F-4387-A679-B55392BB7934
        |   ----------------------------------------------------
        |   Index:    1
        |   Disk:     disk1s2
        |   Status:   Online
        |   Size:     999345127424 B (999.3 GB)
        |
        +-> Logical Volume Family FB42B9F4-CB77-4162-831B-7DCB7816E760
            Encryption Status:       Unlocked
            Encryption Type:         None
            Conversion Status:       NoConversion
            Conversion Direction:    -none-
            Has Encrypted Extents:   No
            Fully Secure:            No
            Passphrase Required:     No
            |
            +-> Logical Volume C0B8479B-C51C-45BF-B59B-1AA5DF3A3B83
                Disk:                  disk2
                Status:                Online
                Size (Total):          1111826497536 B (1.1 TB)
                Conversion Progress:   -none-
                Revertible:            No
                LV Name:               Fusion
                Volume Name:           Fusion
                Content Hint:          Apple_HFS
    FoHeazys-Mac-mini:~ FoHeazy$ diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *121.3 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:          Apple_CoreStorage                         121.0 GB   disk0s2
       3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:          Apple_CoreStorage                         999.3 GB   disk1s2
       3:                 Apple_Boot Boot OS X               650.0 MB   disk1s3
    /dev/disk2
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Fusion                 *1.1 TB     disk2

  • How to view the Users in the Portal Activity Report

    Hello,
    Can anyone tell me how to view the Report of users who have logged in a specific time. For Example I would like to view the users who have logged in between 9.00 am and 9.15 am. Is it possible to view mentioning the country name?
    Please explain me in detail how to view the Report.
    Thnx in Advance
    cheers,
    Murali

    hi,
    You can certainly do it for hourly basis but i am not sure whether it could be done quarter an hour basis. Also The portal nodes within a cluster can be in different time zones, yet the activity data from all nodes are aggregated together and reported together. To enable the reporting of hourly data from different time zones, portal activity reports display hourly data based on the GMT time zone.
    Do see the documentation
    http://help.sap.com/saphelp_nw04/helpdata/en/fb/144120ea5b4e9c9385d493a578d6c9/frameset.htm
    Weblog :Portal SP9: Portal Activity Report
    Regards,
    Ganesh N

Maybe you are looking for

  • File Content Conversion in Receiver File Adapter

    Hi Experts, I got a requirement like "I have to read the below XML and convert into text file with '|' seperator". Below is the XML structure.<Header> is 1..1 cardinality and <Item> is 0..n cardinality and <Response> is 0..1 cardinality. <?xml versio

  • View .erd files in SQL Developer

    Hi, I was given an .erd file that was created in TOAD. I have SQL Developer, and I haven't figured out how to view the file. Do I need a different tool? I do not have the ability to get TOAD, so I will need something else to view these files. Any ide

  • Cloning problem with Tool Tip Manager

    Hi, I am using JDialog which has got JTabbedPane. Inside the JTabbedPane I am using JTable. I want to clone JDialog object, for which I am using deep cloning technique. When I call my overloaded clone method it throws "NotSerializableExcpetion" for j

  • Finder crashes with External Drive on Sleep Mode

    I purchased my new iMac 21,5" less than a week ago, and I haven't had a problem with it except for one that it's been bugging me a lot. I have a LaCie 1TB Quadra d2 external drive that I use to store footage (since it's HD, the filesize won't fit in

  • Refine Edge Crash

    I use Photoshop CS3 10.0.1 on a dual, dual 2.5Ghz Intel Mac with 8Gig of Ram. Everything was working fine until recently Photoshop started crashing with I use the refine edge tool. I can re-create the crash by lowering the feather value to any thing