Client classes¶
_Client
Class¶
- class libpyRR39._Client_ALL¶
Overal information about rrClients. Please see
_ClientStatusThread
and_ClientHardware
for examples.class _Client_ALL properties:
Type
Name
Description
- hw¶
Hardware/OS information of the client
int
- listIdx¶
Index ID of the client
class rrC::_ClientStatus_template
- status¶
Status of client. Class is
_ClientStatus_ALL
class _Client_ALL functions:
Return Type
Name
Description
bool
- isJobSelected()¶
Is a job that the client is rendering currently selected?
Note
Only available when the script runs in rrControl or rrSubmitter
bool
- isSelected()¶
Is the client selected?
Note
Only available when the script runs in rrControl or rrSubmitter
- jobThread(int threadID)¶
Returns the render thread by ID. The maximum threadID is
_ClientStatus_ALL.maxJobThreads
.str
- name()¶
_ClientStatus
Class¶
- class libpyRR39._ClientStatus_ALL¶
Information about rrClients current status.
Example, list clients and if they are enabled:
from rr_python_utils.load_rrlib import rrLib import rr_python_utils.connection as rr_connect tcp = rr_connect.server_connect() tcp.clientGetList() for i in range(tcp.clients.count()): status = tcp.clients.at(i) print(f"{status.name}" is {status.enabled})
class _ClientStatus_ALL properties:
Type
Name
Description
float
- CPU_Usage¶
0-100% all CPUs
float
- GPU_Usage¶
0-100% all GPUs
int
- StructureID¶
int
- VariablesID¶
bool
- enabled¶
Client is Enabled
bool
- isRunningAsService¶
True if launched via clientService
str
- loggedArtist¶
Users logged to the client
int
- maxJobThreads¶
Maximum number of Job Threads
str
- name¶
Client Name
int
- netTrafficSystem_IN¶
Traffic IN in MB/s. Note: Does not work for Cloud Clients! Use the traffic within the job thread instead.
int
- netTrafficSystem_OUT¶
Traffic OUT in MB/s. Note: Does not work for Cloud Clients! Use the traffic within the job thread instead.
int
- noUserInteraction¶
minutes since last user interaction
bool
- overtakeService_WeAreInOverrideMode¶
True if launched via dual mode
byte
- tempHDD¶
Hard Disk temperature
str
- version¶
Client Version
_ClientStatusThread
Class¶
- class libpyRR39._ClientStatusThread¶
Information about rrClients thread activity.
Example, list if clients thread are rendering:
from rr_python_utils.load_rrlib import rrLib import rr_python_utils.connection as rr_connect tcp = rr_connect.server_connect() tcp.clientGetList() for i in range(tcp.clients.count()): status = tcp.clients.at(i) client = tcp.clients.clientAt(i) for j in range(status.maxJobThreads): jt = client.jobThread(j) print(f"{status.name}'s thread {j} is {'not ' if not jt.isRendering() else ''}rendering")
class _ClientStatusThread properties:
Type
Name
Description
byte
- clientStatus¶
float
- jobCPU_Usage¶
int
- jobID¶
ID of the job
bool
- jobIsPreview¶
int
- jobMemoryUsageMB¶
byte
- jobMultiFrameID¶
Tile id
int
- jobSeqEnd¶
End frame of the current segment as frame number.
int
- jobSeqEndJobNr¶
End frame of the current segment as internal job number.
int
- jobSeqStart¶
Start frame of the current segment as frame number.
int
- jobSeqStartJobNr¶
Start frame of the current segment as internal job number.
int
- jobSeqStep¶
Frame step of the current segment as frame number.
int
- jobSeqStepJobNr¶
Frame step of the current segment as internal job number
int
- jobStatus¶
byte
- maxCoresSetForJob¶
class _ClientStatusThread functions:
Return Type
Name
Description
str
- clientStatusAsStringSingle()¶
Returns the clientStatus+jobstatus of the thread as string
bool
- hasKSOLoaded()¶
Returns true if the thread is keeping a scene in memory.
bool
- isRendering()¶
Returns true if the thread is rendering.
_ClientHardware
Class¶
- class libpyRR39._ClientHardware¶
Hardware settings of the render client.
Example, list clients operating system and core:
from rr_python_utils.load_rrlib import rrLib import rr_python_utils.connection as rr_connect tcp = rr_connect.server_connect() tcp.clientGetList() for i in range(tcp.clients.count()) : client = tcp.clients.clientAt(i) print(f"client {client.name()} runs {client.hw.OSasString()} and has {client.hw.coreCount} cores")
class _ClientHardware properties:
Type
Name
Description
byte
- OS¶
Type of Operating System. 1: Windows, 2: Linux, 3: OSX
bool
- OSis64¶
True if the machine is running a 64 bit Operating System
byte
- OSversion¶
version of the Operating System
int
- PS¶
Processor Speed of the client. Relative speed compared to the other clients, more reliable than Ghz when comparing different architectures
int
- coreCount¶
Number of logical cores. (Physical cores x Hyperthreading = Logical Cores)
float
- ghzEffective¶
The total Ghz of the machine. The default Hyperthreading speedup percentage is taken into account.
Note
Since different CPUs vendors (Intel, AMD) and different CPU architectures have different computation speeds at the same GHz, you should use
PS
byte
- gpuCount¶
Number of GPUs
float
- hourCost¶
Overrides the global costs which are calculated per Ghz
int
- hourWatt¶
Custom counter (does not require to be the Watt usage of the machine)
str
- infoStr¶
Some inhouse custom information
bool
- isCloudConnector¶
True if this Client is a Cloud Connector
str
- locationFloor¶
Some inhouse custom information
int
- nrCores¶
Number of logical cores. (Physical cores x Hyperthreading = Logical Cores)
int
- totalMemoryMB¶
Total installed memory.
class _ClientHardware functions:
Return Type
Name
Description
str
- OSasString()¶
_ClientGroupList
Class¶
- class libpyRR39._ClientGroupList¶
Similar to
libpyRR39._ClientGroupList
, but loads the settings from the config files rather than from a tcp connection. Contains the client groups set in rrConfig.Example, list all groups and their render clients:
from rr_python_utils.load_rrlib import rrLib import rr_python_utils.connection as rr_connect tcp = rr_connect.server_connect() group_list = tcp.clientGetGroups() for i in range(group_list.count): group = group_list.clientGroup(i) num_clients = group.count() print(f"Group {group.getName()} contains {num_clients} clients") for j in range(num_clients): print( group.getClientName(j))
class _ClientGroupList properties:
Type
Name
Description
int
- count¶
Get/set the number of groups
datetime.datetime
- settingsFileDate¶
Date/Time of the group settings file loaded/saved.
class _ClientGroupList functions:
Return Type
Name
Description
- clientGroup(int index)¶
Get client group at given index
- clientGroupSet(int index, _ClientGroup group)¶
Replace client group at index with group.
int
- clientGroupsMax()¶
Returns the maximum number of possible groups in this RR version
str
- getError()¶
Returns the error message in case the loadFromFile() or SaveToFile() fails.
str
- groupsOfClient(str clientName)¶
Returns a comma separated list of groups of which the client is a member of
_ClientGroup
Class¶
- class libpyRR39._ClientGroup¶
class _ClientGroup functions:
Return Type
Name
Description
- addClient(str name)¶
Add client name to the group
str
- allMemberGlobalIndices()¶
Returns global indices of all members of this group as a comma separated string
- clear()¶
Remove all clients from the group
int
- count()¶
Number of Clients in group
str
- getClientName(int index)¶
Get client name at list index
str
- getName()¶
Get the name of the group
bool
- isMember_byGlobalIndex(int global-idx)¶
RR keeps a global list of all clients. This function checks if a client at index global-idx in the global list is a member of this group.
- removeClient(str name)¶
Remove client with given name from the group
- removeClientbyID(int index)¶
Remove client at given index from the group
- setName(str name)¶
Set the name of the group