===============
sampo_ps rename
===============

.. contents:: Contents
    :local:

Overview
========

.. warning::

   sampo_ps rename command is deprecated.

**sampo_ps rename** renames a specified process.
The specified process will have the process name changed, but the process version will be kept unchanged.
If the specified new process name already exists, an error will occur.

|

Synopsis
========
See sampo_ps command help::

    $ sampo_ps rename --help

|

Examples
========
You can rename processes using process ID (<process_name>.<process_version>) or process name.

Suppose there are three processes:

    * foo.c8206325-a02b-4ed7-a565-88aeaf173b0c
    * foo.2d418854-1178-4c73-83c4-1b2568a7ce90
    * bar.a165df99-ce9c-43f6-81a0-d612d4ce36a0

|

* Renaming specific process data using process ID::

    $ sampo_ps rename -s file:///var/process_store_storage foo.c8206325-a02b-4ed7-a565-88aeaf173b0c baz

  The process **foo.c8206325-a02b-4ed7-a565-88aeaf173b0c** is renamed to **baz.c8206325-a02b-4ed7-a565-88aeaf173b0c**.

|

* Renaming the process data using process name::

    $ sampo_ps rename -s file:///var/process_store_storage foo baz

  The process **foo.c8206325-a02b-4ed7-a565-88aeaf173b0c** is renamed to **baz.c8206325-a02b-4ed7-a565-88aeaf173b0c**, and the process **foo.2d418854-1178-4c73-83c4-1b2568a7ce90** is renamed to **baz.2d418854-1178-4c73-83c4-1b2568a7ce90**.

|

Reconfiguration of SRC
======================
When you rename a specific process with **sampo_ps rename**, the SRC file in the ProcessStore is reconfigured to reflect the new name.
There are several differences between the original SRC file and the new SRC file as shown below:

* The process name at the first line of the SRC file is rewritten with the new name.
* The file is renamed to *dump.src*.
* All comments are deleted.
* Filters will be rewritten in the format where all parameters are visible. Implied parameters will display their default value when rewritten.
