Opened 6 years ago

Closed 5 years ago

#393 closed enhancement (fixed)

create commandline resource allocation wrapper

Reported by: joerg Owned by: mickey
Priority: major Milestone: cornucopia-0.10
Component: framework/general Version:
Keywords: resource allocation Cc:


mdbus-allocate acts as a wrapper for arbitrary cmdline executables and allocates resources from framework via dbus, freeing them after the managed executable exits.


mdbus-allocate -f -r <resource[,resource]> <cmd> <arguments>

-f --force : don't fail if resource can't be allocated. Without -f mdbus-allocate will not call 'cmd' and instead will exit with error code of ?? if any of the specified resources can not be allocated.

-r --resource resource : dbus-resource(s) to allocate and keep until 'cmd' exits

cmd: managed executable to be called

arguments: commandline arguments passed to 'cmd'

This command can be used to call applications that shouldn't be suspended. For this invoke mdbus-allocate to request cpu-resource

Change History (5)

comment:1 Changed 6 years ago by nicola.mfb

Please take a look at:

and give me suggestions if it's wrong in some parts or has to be enanched.

comment:2 Changed 6 years ago by daniel

  • Milestone set to milestone6

This sounds really interesting. Bumping to ms6

comment:3 Changed 6 years ago by PaulFertser

There's already an app by Nicola Ranaldo <nicola.ranaldo@…> that does exactly that and a bit more:

$ fsoraw-armel 
Usage: fsoraw [options] [--] command args
        -h, --help                      show help and quit
        -l, --listresources             list resources (do not mix with -r)
        -r, --resources=res1,res2,...   allocate resource from FSO
        -f, --force                     continue execution even if some resource
                                        cannot be allocated
        -t, --timeout=MSECS             override default dbus timeout:25000
        -s, --stderr                    log to stderror too

         fsoraw --resources CPU,Display tangogps
         fsoraw -r Wifi -- mysupplicant -x -d -w

comment:4 Changed 5 years ago by stefan

Joerg, does fsoraw gives you what you need? If yes, please close the bug.

comment:5 Changed 5 years ago by joerg

  • Resolution set to fixed
  • Status changed from new to closed

fsoraw is great.
closing ticket

Note: See TracTickets for help on using tickets.