Gsoc 18 Project | Collect build statistics

Mojca Miklavec mojca at macports.org
Thu Apr 26 05:24:36 UTC 2018


Dear Vishnu,

On 26 April 2018 at 06:44, Jackson Isaac wrote:
> On Thu, Apr 26, 2018 at 3:42 AM, Vishnu wrote:
>> Finally was able to install it.
>> And successfully run mpstats.
>
> Great to hear that! You are making a good progress. Keep it up.
>
>> root at vishnupc:~# /opt/local/bin/port content  mpstats
>> Port mpstats contains:
>>   /Library/LaunchDaemons/org.macports.mpstats.plist
>>
>> /opt/local/etc/LaunchDaemons/org.macports.mpstats/org.macports.mpstats.plist.default
>>   /opt/local/etc/macports/stats.conf
>>   /opt/local/libexec/mpstats
>>
>> Mojca you said there will be a change in os statistics
>> (http://stats.macports.neverpanic.de/os_statistics#os_platform) .
>> I couldn't see any change.

I'm sorry, I forgot about one important aspect. On macOS the port
installs an equivalent of a cron job. That's the file
    /Library/LaunchDaemons/org.macports.mpstats.plist
This file has absolutely no meaning or functionality on Linux.

The proper fix would be to:
- enclose the part of functionality that's responsible for this into a
"darwin { ... }" section (not that hard to do, but would not really
solve anything)
- potentially write a replacement functionality, but that's tricky
because each system has a different way of setting up jobs, even
Debian alone has at least two ways (systemd or initd or however that
older one is called, I forgot), not to mention that any *BSD has its
own system in place

> When you run 'port contents <portname>' it lists you the files that
> are installed by that port.
>
> Here you would want to run '/opt/local/libexec/mpstats'.
>
> Basically it shows me two options. But I would like you to explore the
> command and let us know what you infer from them :)
>
> If I give out the exact command you might not be able to try out other
> commands available.

Indeed, here you can run the command manually (feel free to explore
yourself :). It will be by far the easiest workaround and you'll need
to run it manually for predictable testing anyway.

I'm actually pretty curious what exactly the command does on Linux,
I'm not aware of anyone actually testing it on a non-mac platform
earlier. It might be that mpstats will need minor tweaks to work
correctly on Linux, but I hope that at least the platform is reported
correctly.

Take a look at the contents of sysutils/mpstats in the git repository
and try to figure out what each file does. The *.plist files are meant
to tell the OS how to periodically run the commands and can probably
"safely be ignored" on any other OS.

Mojca


More information about the macports-dev mailing list