forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sync): merged autoware.iv/pull/2362 (autowarefoundation#761) (a…
…utowarefoundation#134) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> Co-authored-by: h-mitsui-esol <57085544+h-mitsui-esol@users.noreply.github.com> Signed-off-by: 1222-takeshi <m.takeshi1995@gmail.com>
- Loading branch information
1 parent
ffeb23d
commit c4d64f4
Showing
19 changed files
with
809 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
/**: | ||
ros__parameters: | ||
temp_warn: 90.0 | ||
temp_error: 95.0 | ||
usage_warn: 0.90 | ||
usage_warn: 0.96 | ||
usage_error: 1.00 | ||
usage_count: 2 | ||
usage_avg: true | ||
msr_reader_port: 7634 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/**: | ||
ros__parameters: | ||
usage_warn: 0.95 | ||
usage_error: 0.99 | ||
available_size: 1024 # MB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/**: | ||
ros__parameters: | ||
devices: ["*"] | ||
usage_warn: 0.95 | ||
traffic_reader_port: 7636 | ||
monitor_program: "greengrass" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ | |
| level | message | | ||
| ----- | ------- | | ||
| OK | OK | | ||
| WARN | warm | | ||
| ERROR | hot | | ||
|
||
<b>[values]</b> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# traffic_reader | ||
|
||
## Name | ||
|
||
traffic_reader - monitoring netwok traffic by process | ||
|
||
## Synopsis | ||
|
||
traffic_reader [OPTION] | ||
|
||
## Description | ||
|
||
Monitoring netwok traffic by process.<br> | ||
This runs as a daemon process and listens to a TCP/IP port (7636 by default). | ||
|
||
**Options:**<br> | ||
_-h, --help_<br> | ||
Display help<br> | ||
_-p, --port #_<br> | ||
Port number to listen to | ||
|
||
**Exit status:**<br> | ||
Returns 0 if OK; non-zero otherwise. | ||
|
||
## Notes | ||
|
||
The 'traffic_reader' requires nethogs command.<br> | ||
|
||
## Operation confirmed platform | ||
|
||
- Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-40-generic x86_64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
system/system_monitor/include/traffic_reader/traffic_reader.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright 2021 Tier IV, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
/** | ||
* @file traffic_reader.h | ||
* @brief traffic reader definitions | ||
*/ | ||
|
||
#ifndef TRAFFIC_READER__TRAFFIC_READER_HPP_ | ||
#define TRAFFIC_READER__TRAFFIC_READER_HPP_ | ||
|
||
#include <boost/serialization/serialization.hpp> | ||
#include <boost/serialization/string.hpp> | ||
|
||
#include <string> | ||
|
||
/** | ||
* @brief traffic information | ||
*/ | ||
struct TrafficReaderResult | ||
{ | ||
int error_code_; //!< @brief error code, 0 on success, otherwise error | ||
std::string str_; //!< @brief nethogs result string | ||
|
||
/** | ||
* @brief Load or save data members. | ||
* @param [inout] ar archive reference to load or save the serialized data members | ||
* @param [in] version version for the archive | ||
* @note NOLINT syntax is needed since this is an interface to serialization and | ||
* used inside boost serialization. | ||
*/ | ||
template <typename archive> | ||
void serialize(archive & ar, const unsigned /*version*/) // NOLINT(runtime/references) | ||
{ | ||
ar & error_code_; | ||
ar & str_; | ||
} | ||
}; | ||
|
||
constexpr std::string_view GET_ALL_STR{"<All>"}; //!< @brief nethogs result all request string | ||
|
||
constexpr int TRAFFIC_READER_PORT = 7636; //!< @brief traffic reader port: 7634-7647 Unassigned | ||
|
||
#endif // TRAFFIC_READER__TRAFFIC_READER_HPP_ |
Oops, something went wrong.