plaso.multi_processing package¶
Submodules¶
plaso.multi_processing.analysis_process module¶
The multi-process analysis process.
-
class
plaso.multi_processing.analysis_process.
AnalysisProcess
(event_queue, storage_writer, knowledge_base, analysis_plugin, data_location=None, event_filter_expression=None, **kwargs)[source]¶ Bases:
plaso.multi_processing.base_process.MultiProcessBaseProcess
Multi-processing analysis process.
plaso.multi_processing.base_process module¶
Base class for a process used in multi-processing.
-
class
plaso.multi_processing.base_process.
MultiProcessBaseProcess
(enable_sigsegv_handler=False, **kwargs)[source]¶ Bases:
multiprocessing.process.Process
Class that defines the multi-processing process interface.
-
rpc_port
¶ int – port number of the process status RPC server.
-
name
¶ str – process name.
-
plaso.multi_processing.engine module¶
plaso.multi_processing.multi_process_queue module¶
A multiprocessing-backed queue.
-
class
plaso.multi_processing.multi_process_queue.
MultiProcessingQueue
(maximum_number_of_queued_items=0, timeout=None)[source]¶ Bases:
plaso.engine.plaso_queue.Queue
Multi-processing queue.
-
Close
(abort=False)[source]¶ Closes the queue.
This needs to be called from any process or thread putting items onto the queue.
Parameters: abort (Optional[bool]) – True if the close was issued on abort.
-
plaso.multi_processing.plaso_xmlrpc module¶
XML RPC proxy server and client.
-
class
plaso.multi_processing.plaso_xmlrpc.
ThreadedXMLRPCServer
(callback)[source]¶ Bases:
plaso.multi_processing.rpc.RPCServer
Class that defines the threaded XML RPC server.
-
class
plaso.multi_processing.plaso_xmlrpc.
XMLProcessStatusRPCClient
[source]¶ Bases:
plaso.multi_processing.plaso_xmlrpc.XMLRPCClient
Class that defines a XML process status RPC client.
-
class
plaso.multi_processing.plaso_xmlrpc.
XMLProcessStatusRPCServer
(callback)[source]¶ Bases:
plaso.multi_processing.plaso_xmlrpc.ThreadedXMLRPCServer
Class that defines a XML process status RPC server.
-
class
plaso.multi_processing.plaso_xmlrpc.
XMLRPCClient
[source]¶ Bases:
plaso.multi_processing.rpc.RPCClient
Class that defines the XML RPC client.
plaso.multi_processing.psort module¶
plaso.multi_processing.rpc module¶
The RPC client and server interface.
-
class
plaso.multi_processing.rpc.
RPCServer
(callback)[source]¶ Bases:
object
RPC server interface.
plaso.multi_processing.task_engine module¶
plaso.multi_processing.task_manager module¶
The task manager.
-
class
plaso.multi_processing.task_manager.
TaskManager
[source]¶ Bases:
object
Manages tasks and tracks their completion and status.
A task being tracked by the manager must be in exactly one of the following states:
- abandoned: no status information has been recently received from a worker
- about the task, and is assumed to be abandoned.
- queued: the task is waiting for a worker to start processing it. It’s also
- possible that a worker has already completed the task, but no status update was collected from the worker while it processed the task.
- processing: a worker is processing the task.
- pending_merge: a worker has completed processing the task and the
- results are ready to be merged with the session storage.
- merging: tasks that are being merged by the engine.
Once the engine reports that a task is completely merged, it is removed from the task manager.
Tasks that are not abandoned, or abandoned, but need to be retried are considered “pending”, as there is more work that needs to be done to complete them.
-
CompleteTask
(task)[source]¶ Completes a task.
The task is complete and can be removed from the task manager.
Parameters: task (Task) – task.
-
CreateTask
(session_identifier)[source]¶ Creates a task.
Parameters: session_identifier (str) – the identifier of the session the task is part of. Returns: task attribute container. Return type: Task
-
GetRetryTask
()[source]¶ Creates a task that is an attempt to retry an abandoned task.
Returns: - a task that is a retry of an existing task, or None if there are
- no tasks that need to be retried.
Return type: Task
-
GetStatusInformation
()[source]¶ Retrieves status information about the tasks.
Returns: tasks status information. Return type: TasksStatus
-
GetTaskPendingMerge
(current_task)[source]¶ Retrieves the first task that is pending merge or has a higher priority.
This function will check if there is a task with a higher merge priority than the current_task being merged. If so, that task with the higher priority is returned.
Parameters: current_task (Task) – current task being merged or None if no such task. Returns: - the next task to merge or None if there is no task pending merge or
- with a higher priority.
Return type: Task
-
GetTasksCheckMerge
()[source]¶ Retrieves the tasks that need to be checked if they are ready for merge.
Returns: - tasks that are being processed by workers or that have been
- abandoned.
Return type: list[Task]
-
HasPendingTasks
()[source]¶ Determines if there are tasks running, or in need of retrying.
Returns: - True if there are tasks that are active, ready to be merged, or
- need to be retried.
Return type: bool