arcshell

Modules Reference

Module About
Alerting Easily incorporates recurring alerts and notifications into your scripts.
ArcShell Contains functions to manage local and remote ArcShell nodes.
Caching A simple yet powerful key value data store.
Configuration Manages configuration files and semi-static objects.
Contact Groups Manages group membership and the rules used to send messages to the group.
Counters A fast counter management mechanism.
Cron Make and schedule solutions using cron styled attributes.
Demo Create playable command line demonstrations.
Documentation Engine Generate documentation and help commands from source files.
Dates & Times Makes working with dates and times easier.
Files Simplifies many common file and directory related tasks.
Flags Simple way to set and retrieve a keyed value.
Keywords Manages keywords and their attributes.
Locking Creates and manages locks for you.
Application Logger Logs and keeps track of events.
Log Monitoring Monitors log files.
Menus Builds rich command line menu systems that are dynamic.
Messaging Manages the routing and sending of messages.
Numbers Number and math functions.
Objects Manages object styled data structures.
OS Basic operating system related functions for Unix/Linux.
Packager Package a directory for deployment or distribution to remote nodes.
rsync A simple rsync interface.
Scheduler Easily create scheduled tasks.
SendGrid SendGrid interface.
Sensors Detects changes or things that have not changed.
SSH Connection Manager Manages ssh connections.
SSH Manage ssh connections and execute remote scripts or commands.
Data Stacks Create and manage small data stacks which operate a little like arrays.
Statistics Stores statistics. Performs aggregation, analysis, and anomaly detection.
Strings Library loaded with string functions.
Tar This module is used to to work with tar files.
Timeout Implement timeouts to kill hung processes and perform other time dependent tasks.
Timer Create and manage timers for timing all sorts of things.
Utilities Misc. utilities.
Watcher Watches files, directories, processes and other things.
Debug Provides advanced debug capabiltiies.
Unit Testing A unit test library for bash and korn shells.

alarm-clock-1.png

Alerting (arcshell_alerts.sh)

Easily incorporates recurring alerts and notifications into your scripts.

Example(s)


   # Source in ArcShell
   . "${HOME}/.arcshell"

   # Open a 'critical' alert if the cron process is not running.
   if (( $(ps -ef | grep "cron" | grep -v "grep" | wc -l) == 0 )); then
      alert_open_critical "cron_process_alert" "'cron' process is not running!"
   else
      # Automatically closes alert if it has been opened.
      alert_close_alert "cron_process_alert"
   fi

network.png

ArcShell (arcshell_arc.sh)

Contains functions to manage local and remote ArcShell nodes.

Example(s)


   # Package the current ArcShell home.
   arc_pkg 
   # Set the SSH connection to 'tst'. 'tst' is already configured as an SSH connection.
   ssh_set "tst"
   # Setup ArcShell on 'tst' using the package we just created. 
   arc_deploy -force
   # Assume some change has been made. Re-package the current ArcShell home.
   arc_pkg 
   # Update the remote ArcShell home on 'tst' using the new package.
   arc_update 
   # Assume another change has been made.
   # Use rsync to sync the current ArcShell home to 'tst' home. This skips the packaging step.
   arc_rsync
   # Remove ArcShell from the report 'tst' home/
   arc_remove

key.png

Caching (arcshell_cache.sh)

A simple yet powerful key value data store.

Example(s)


   # Cache a value for 'city'.
   cache_save "city" "Nashville"
   # Get the value of 'city'.
   x="$(cache_get "city")"
   echo "City is ${x}."

switch-4.png

Configuration (arcshell_config.sh)

Manages configuration files and semi-static objects.


user-6.png

Contact Groups (arcshell_contact_groups.sh)

Manages group membership and the rules used to send messages to the group.


add-1.png

Counters (arcshell_counters.sh)

A fast counter management mechanism.


clock.png

Cron (arcshell_cron.sh)

Make and schedule solutions using cron styled attributes.


record.png

Demo (arcshell_demo.sh)

Create playable command line demonstrations.


compose.png

Documentation Engine (arcshell_doceng.sh)

Generate documentation and help commands from source files.


calendar-5.png

Dates & Times (arcshell_dt.sh)

Makes working with dates and times easier.


file.png

Files (arcshell_file.sh)

Simplifies many common file and directory related tasks.


flag-4.png

Flags (arcshell_flags.sh)

Simple way to set and retrieve a keyed value.

Example(s)


   # Set a flag.
   flag_set "status" "active"
   # Check to see if the flag exists.
   if flag_exists "status"; then
      echo "The 'status' flag exists."
   fi
   # Get the value of a flag.
   if [[ "$(flag_get 'status')" == "active" ]]; then
      flag_set "status" "inactive"
   fi
   # Unset (remove) the flag.
   flag_unset "status"

sign-1.png

Keywords (arcshell_keywords.sh)

Manages keywords and their attributes.


lock.png

Locking (arcshell_lock.sh)

Creates and manages locks for you.


infinity.png

Application Logger (arcshell_logger.sh)

Logs and keeps track of events.


view.png

Log Monitoring (arcshell_logmon.sh)

Monitors log files.


menu-3.png

Builds rich command line menu systems that are dynamic.


smartphone-1.png

Messaging (arcshell_msg.sh)

Manages the routing and sending of messages.


division.png

Numbers (arcshell_num.sh)

Number and math functions.


database-2.png

Objects (arcshell_obj.sh)

Manages object styled data structures.


server.png

OS (arcshell_os.sh)

Basic operating system related functions for Unix/Linux.


gift.png

Packager (arcshell_pkg.sh)

Package a directory for deployment or distribution to remote nodes.


repeat-1.png

rsync (arcshell_rsync.sh)

A simple rsync interface.


clock-1.png

Scheduler (arcshell_sch.sh)

Easily create scheduled tasks.


incoming.png

SendGrid (arcshell_sendgrid.sh)

SendGrid interface.


compass.png

Sensors (arcshell_sensor.sh)

Detects changes or things that have not changed.


id-card-2.png

SSH Connection Manager (arcshell_ssh_connections.sh)

Manages ssh connections.


cloud-computing-1.png

SSH (arcshell_ssh.sh)

Manage ssh connections and execute remote scripts or commands.


layers.png

Data Stacks (arcshell_stack.sh)

Create and manage small data stacks which operate a little like arrays.


radar.png

Statistics (arcshell_stats.sh)

Stores statistics. Performs aggregation, analysis, and anomaly detection.


command.png

Strings (arcshell_str.sh)

Library loaded with string functions.


archive-2.png

Tar (arcshell_tar.sh)

This module is used to to work with tar files.


hourglass.png

Timeout (arcshell_timeout.sh)

Implement timeouts to kill hung processes and perform other time dependent tasks.


stopwatch-1.png

Timer (arcshell_timer.sh)

Create and manage timers for timing all sorts of things.

Example(s)


   # Create the timer and start it.
   timer_create -force -start "foo"
   # Do something for 5 seconds.
   sleep 5
   # Should return 5.
   timer_seconds "foo"
   # Do something for 55 seconds.
   sleep 55
   # Should return 1.
   timer_minutes "foo"
   # Stop the timer.
   timer_stop "foo"
   # Starts the timer counting from the point it was stopped at.
   timer_start "foo"
   # End the timer.
   timer_end "foo"

magnet.png

Utilities (arcshell_utl.sh)

Misc. utilities.


spotlight.png

Watcher (arcshell_watch.sh)

Watches files, directories, processes and other things.


blueprint.png

Debug (debug.sh)

Provides advanced debug capabiltiies.


list.png

Unit Testing (unittest.sh)

A unit test library for bash and korn shells.