Add docs about current service class system, tiny util to make updates a
little easier than the standard config util
This commit is contained in:
parent
9a0264f5d2
commit
f7731d7e8f
31
doc/service_classes.bb
Normal file
31
doc/service_classes.bb
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[b]Service Classes[/b]
|
||||||
|
|
||||||
|
Service classes allow you to set limits on system resources. A GUI to configure this is currently under development.
|
||||||
|
|
||||||
|
As a temporary measure, the following commandline utilities can be used:
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
[code]util/service_class[/code]
|
||||||
|
list service classes
|
||||||
|
|
||||||
|
[code]util/config system default_service_class firstclass[/code]
|
||||||
|
set the default service class to 'firstclass'
|
||||||
|
|
||||||
|
[code]util/service_class firstclass[/code]
|
||||||
|
list the services that are part of 'firstclass' service class
|
||||||
|
|
||||||
|
[code]util/service_class firstclass photo_upload_limit 10000000[/code]
|
||||||
|
set firstclass total photo disk usage to 10 million bytes
|
||||||
|
|
||||||
|
[b]current limits[/b]
|
||||||
|
photo_upload_limit - maximum total bytes for photos
|
||||||
|
total_items - maximum total toplevel posts
|
||||||
|
total_pages - maximum comanche pages
|
||||||
|
total_identities - maximum number of channels owned by account
|
||||||
|
total_channels - maximum number of connections
|
||||||
|
total_feeds - maximum number of rss feed connections
|
||||||
|
attach_upload_limit - maximum file upload storage (bytes)
|
||||||
|
minimum_feedcheck_minutes - lowest setting allowed for polling rss feeds
|
||||||
|
chatrooms - maximum chatrooms
|
||||||
|
chatters_inroom - maximum chatters per room
|
34
util/service_class
Executable file
34
util/service_class
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// Temporary service class utility - see baseurl/help/service_classes
|
||||||
|
|
||||||
|
require_once('include/cli_startup.php');
|
||||||
|
|
||||||
|
cli_startup();
|
||||||
|
|
||||||
|
if($argc > 3) {
|
||||||
|
$d = get_config('service_class', $argv[1]);
|
||||||
|
$d[$argv[2]] = $argv[3];
|
||||||
|
set_config('service_class', $argv[1], $d);
|
||||||
|
echo 'Updated service class "' . $argv[1] . '" service "' . $argv[2] . '" to ' . $argv[3] . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($argc == 2) {
|
||||||
|
$d = get_config('service_class', $argv[1]);
|
||||||
|
echo $argv[1] . ":\n";
|
||||||
|
foreach($d as $k => $v) {
|
||||||
|
echo "$k = $v\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($argc == 1) {
|
||||||
|
load_config('service_class');
|
||||||
|
foreach($a->config['service_class'] as $class=>$props) {
|
||||||
|
echo "$class:\n";
|
||||||
|
$d = unserialize($props);
|
||||||
|
foreach($d as $k => $v) {
|
||||||
|
echo "\t$k = $v\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user