Show / Hide Table of Contents

    1.4.0 January 12 2024

    Added .NET 8 support to pbm

    1.3.3 January 10 2024

    • Update Akka.NET to v1.5.15.
    • Update Akka.Hosting to v1.5.15

    1.3.2 July 18 2023

    This is a pretty significant set of feature improvements for Petabridge.Cmd.

    New Commands

    In 1.3.2 we've added two new commands to the built-in pallettes contained inside Petabridge.Cmd.Host:

    • net clients - gives a printout of all local and remote clients connected to the current host.
    • net drop-all-clients - a somewhat dangerous command intended to be used by ops teams that rely on lots of PbmClient instances internally. This command will automatically terminate all clients connected to the current host. Clients will receive a notification that the host has disconnected from them.

    Other Changes and Improvements

    • actor hierarchy now prints out all /system actors by default - to turn this behavior off please pass in the new -e parameter to exclude /system actors from your query.
    • Fixed stability issues with IPbmClient not always shutting itself off cleanly on both the server and the client.
    • IPbmClient now includes a specific CloseAsync method along with a Task WhenClosed that you can await on (in case the server shuts the client off first.)
    • IPbmClient now implements IAsyncDisposable, which will just call CloseAsync under the covers.
    • Update Akka.Hosting and Akka.NET to v1.5.8.

    1.3.1 May 4 2023

    Petabridge.Cmd is a maintenance upgrade that fixes some potential memory usage bugs with Petabridge.Cmd.Host:

    • Fix out of memory bug in message decoder, which can be cause by non-pbm clients sending unframed messages to the host port.
    • Update Akka.NET to v1.5.5.
    • Update Akka.Hosting to v1.5.5

    1.3.0 March 02 2023

    v1.3.0 upgrades Petabridge.Cmd to Akka.NET v1.5.0.

    1.2.2 January 18 2023

    v1.2.2 is a small update that introduces some changes to Petabridge.Cmd's Akka.Hosting APIs.

    • Upgraded to Akka.Hosting v1.0, which stabilizes all Akka.Hosting APIs;
    • Added a new PetabridgeCmdOptions class which makes it possible to set the petabridge.cmd.host and petabridge.cmd.port bindings programmatically.

    An example of how to configure the PetabridgeCmd host programmatically:

    using var host = await (new HostBuilder().ConfigureServices((context, collection) =>
    {
        collection.AddAkka("PbmSys", builder =>
        {
            builder.WithRemoting("localhost", 29909)
                .WithClustering(new ClusterOptions(){ SeedNodes = new[]{ "akka.tcp://PbmSys@localhost:29909" }})
            .AddPetabridgeCmd(
                    new PetabridgeCmdOptions(){ Host = "localhost", Port = 8222}, // optional - customize pbm bindings 
                    cmd =>
            {
                cmd.RegisterCommandPalette(new RemoteCommands());
                cmd.RegisterCommandPalette(ClusterCommands.Instance);
            });
        });
    }).StartAsync());
    

    1.2.1 December 19 2022

    v1.2.1 is a patch release that fixes a breaking change made to the net myip command, which caused the command to no longer work as of Petabridge.Cmd v1.0. This has been fixed and net myip now works as expected.

    Upgraded to Akka.NET v1.4.47.

    1.2 November 17 2022

    v1.2 is a minor version release that adds a new remote command palette dedicated to remote node and network disruption testing.

    • Upgraded to Akka.NET v1.4.46;
    • Add Petabridge.Cmd.Remote.FailureInjection palette for testing Akka.Remote and Akka.Cluster applications;
    • Add .NET 7.0 support to pbm

    Petabridge.Cmd.Remote.FailureInjection

    Petabridge.Cmd.Remote.FailureInjection is a new command palette module that allows you to test and simulate different types of disruptions inside your Akka.NET remote and cluster nodes. The palette allows you to:

    • inject-failure kill-process : Simulate crashing node
    • inject-failure throttle : Simulate degrading network transfer rate
    • inject-failure gremlin : Simulate degrading network with dropped messages
    • inject-failure disassociate : Inject a disassociated event into a remote transport
    • inject-failure quarantine : inject a quarantined event into a remote transport

    See the full documentation here

    1.1.3 October 20 2022

    Minor Version Release for Petabridge.Cmd

    • Upgraded to Akka.NET v1.4.45

    1.1.2 September 28 2022

    Minor Version Release for Petabridge.Cmd

    • Upgraded to Akka.NET v1.4.43 in order to fix a major bug in the cluster-sharding locate-entity command.

    1.1.1 September 23 2022

    Minor Version Release for Petabridge.Cmd

    In Petabridge.Cmd 1.1.1 we have added three new commands:

    • actor ping - used to ping an actor via its ActorPath to validate that it's alive and responsive;
    • actor stop - used to gracefully terminate an actor at a given ActorPath via a PoisonPill message; and
    • cluster-sharding locate-entity - part of the Petabridge.Cmd.Cluster.Sharding module, it can be used to find the location of a specific sharded entity actor inside the current cluster.

    Other minor changes in this release:

    • Upgraded to Akka.NET v1.4.42.

    1.1.0 June 06 2022

    Minor Version Release for Petabridge.Cmd

    In Petabridge.Cmd 1.1 we add support for Akka.Hosting, which makes it trivial to add PetabridgeCmd to any ActorSystem with minimal configuration:

    using var host = await (new HostBuilder().ConfigureServices((context, collection) =>
    {
        collection.AddAkka("PbmSys", builder =>
        {
            builder.WithRemoting("localhost", 29909)
                .WithClustering(new ClusterOptions(){ SeedNodes = new[]{ Address.Parse("akka.tcp://PbmSys@localhost:29909"),  }})
            .AddPetabridgeCmd(cmd =>
            {
                cmd.RegisterCommandPalette(new RemoteCommands());
                cmd.RegisterCommandPalette(ClusterCommands.Instance);
            });
        });
    }).StartAsync());
    

    The AddPetabridgeCmd method will create the PetabridgeCmd instance, allow you to register CommandPalettes on it, and then start listening on the pbm port as soon as the ActorSystem is started by Akka.Hosting.

    Other minor changes in this release:

    • Upgraded to Akka.NET v1.4.39.

    1.0.2 November 16th 2021

    Maintenance Release for Petabridge.Cmd 1.0

    • Upgraded to Akka.NET v1.4.28
    • Added .NET 6 support to pbm

    1.0.1 August 3rd 2021

    Maintenance Release for Petabridge.Cmd 1.0

    • Fixed bugs with IPbmClient that caused CommandResponse streams to be prematurely truncated;
    • Fixed bugs with CommandResponse not propagating SessionIds correctly under some circumstances;
    • Added overloads to all IPbmClient.ExecuteTextCommandAsync methods which accept a CancellationToken;
    • Updated Petabridge.Cmd.Remote, Petabridge.Cmd.Cluster, and the actor hierarchy commands to all fully support multiple concurrent sessions from the same client;
    • Broke the Petabridge.Cmd.Remote.RemoteCommands.Instance method intentionally in order to force users to create new instance each time a new ActorSystem that uses it is launched. This is due to the remote history command needing to store state over the lifespan of the entire ActorSystem in a single actor that has to be used across multiple connections over a long period of time and that actor must be re-created each time a new ActorSystem starts.
    • Added new documentation for creating custom pbm commands: "Handling Commands with Session Support (1.0 and Above)."

    1.0.0 July 26 2021

    Petabridge.Cmd v1.0.0 is a major release of Petabridge.Cmd that doesn't include any breaking changes for older clients.

    Programmatic IPbmClient Support

    It is now possible to invoke Petabridge.Cmd programmatically, as of Petabridge.Cmd 1.0.0 - and this can be done in one of two ways:

    1. In-process, inside the same Akka.NET ActorSystem that is running the PetabridgeCmd host;
    2. Remotely, from an external process that connects to the PetabridgeCmd host using the same TCP port used by the pbm CLI clients.

    We've added extensive documentation to the Petabridge.Cmd website which documents how to use these new IPbmClient implementations, but we've also included a small example here:

    // <configureHost>
    // create a Petabridge.Cmd host from our ActorSystem
    // host is configured to run on port 11555 via HOCON
    var pbmHost = PetabridgeCmd.Get(Sys);
    
    // start the host
    pbmHost.Start();
    // </configureHost>
    
    // <clientActorSystem>
    // create client ActorSystem
    using ActorSystem clientSystem = ActorSystem.Create("ClientSystem");
    
    // grab copy of the PetabridgeCmdClient extension (Petabridge.Cmd.Common NuGet package)
    var clientExt = PetabridgeCmdClient.Get(clientSystem);
    
    // create IpEndPoint or DnsEndPoint for contacting remote host
    // either one of these would work
    var ip = new IPEndPoint(IPAddress.Loopback, 11555);
    var dns = new DnsEndPoint("localhost", 11555);
    
    // start a new IPbmClient attached to one of these EndPoints
    // by default this operation will time out in 5 seconds.
    // you can extend that by passing in a custom CancellationToken
    IPbmClient remoteClient = await clientExt.StartRemoteClient(ip);
    // </clientActorSystem>
    
    // <runClient>
    // invoke a "log peek" command, just like you would on CLI
    CommandSession session = await remoteClient.ExecuteTextCommandAsync("log peek");
    
    // grab a hold of the Akka.Streams materializer from ActorSystem
    var materializer = Sys.Materializer();
    
    // pipe the Akka.Streams Source<CommandResponse> to a Sink<CommandResponse>
    // in this case, we're just going to send everything to a TestActor.
    // 
    // This Akka.Streams "graph" can be materialized into a Task, which will
    // complete once the stream is marked as complete by the Petabridge.Cmd host.
    var completionTask = session.Stream.RunForeach(rsp =>
    {
        TestActor.Tell(rsp);
    }, materializer);
    
    // a client can also cancel the stream using the KillSwitch included
    // inside the CommandSession object
    session.KillSwitch.Shutdown();
    
    // once either of those two events occur, the Task returned earlier
    // will be complete
    await completionTask;
    
    // and we can validate that the TestActor received at least one CommandResponse
    var response = ExpectMsg<CommandResponse>();
    // </runClient>
    

    Multiple Concurrent Client Sessions

    Another major architectural change we've introduced to Petabridge.Cmd in order to support programmatic clients is the notion of multiple client-facing sessions all originating from the same connection. Petabridge.Cmd now effectively supports command multi-plexing on the server and client side.

    In effect, a single IPbmClient can now run multiple streaming commands at once - such as log tail, cluster tail, and remote tail, all over the same TCP connection.

    This is a minor breaking change to some command palettes - all of the official Petabridge ones will be updated shortly to support this, but user-defined CommandPalettes may also need to be updated in order to support this. We will update our "Creating Custom Commands" documentation shortly to help developers implement these changes successfully - the changes required are minor.

    0.8.5 May 03 2021

    Petabridge.Cmd v0.8.5 is a minor release that adds some small features and updates to Petabridge.Cmd:

    Added dependency to Phobos.Actor.Common, and disabled all Phobos tracing / monitoring on

    • Petabridge.Cmd.Host.LogMemorizer
    • Petabridge.Cmd.Host.TailActor
    • Petabridge.Cmd.Cluster.ClusterTailActor

    0.8.4 April 30 2021

    Petabridge.Cmd v0.8.4 is a minor release that adds some small features and updates to Petabridge.Cmd:

    • Added .NET 5.0 support to pbm
    • Upgraded to Akka.NET v1.4.19

    0.8.3 March 17 2021

    Petabridge.Cmd v0.8.3 is a minor release that adds some small features and updates to Petabridge.Cmd:

    • Upgraded to Akka.NET v1.4.17
    • Added .NET 5 support to pbm
    • Fixed the pbm remote history command such that the default command with no time parameters now shows THE ENTIRE Akka.Remote history going back to the 1000 most recent events. If you call pbm remote history -h {host address} you can also view this history for just connections between a specific host and the node you're currently connected to.

    0.8.2 November 24 2020

    Petabridge.Cmd v0.8.2 is a minor release that adds some more customization to actor hierarchy command.

    • pbm: Make actor hierarchy command traversal time customizable - added timeout-per-level parameter to actor hierarchy pbm command;

    0.8.1 November 16 2020

    Petabridge.Cmd v0.8.1 is a minor release that solves some issues and bugs reported with Petabridge.Cmd v0.8.0 and earlier.

    • pbm: Exit code is 0 when failed to connect - pbm now returns -2 on fail to connect;
    • pbm: ArgumentOutOfRangeException, parameter "top"
    • Petabridge.Cmd.Cluster: Modify cluster leave command to support having multiple nodes leave at once
    • Petabridge.Cmd.Cluster: Add support for tracking Akka.Cluster "app version"
    • Akka.NET: upgraded to Akka.NET v1.4.12

    You can see the full set of changes for Petabridge.Cmd v0.8.1 here.

    0.8.0 March 11 2020

    Petabridge.Cmd v0.8.0 builds on top of the work of Petabridge.Cmd v0.7.1, but aimed at supporting the Akka.NET v1.4.1 implementation of Akka.NET.

    0.8.0-rc2 March 10 2020

    Petabridge.Cmd v0.8.0-rc1 builds on top of the work of Petabridge.Cmd v0.7.1, but aimed at supporting the Akka.NET v1.4.1-rc3 implementation of Akka.NET.

    0.8.0-rc1 March 03 2020

    Petabridge.Cmd v0.8.0-rc1 builds on top of the work of Petabridge.Cmd v0.7.1, but aimed at supporting the Akka.NET v1.4.1-rc1 implementation of Akka.NET.

    0.7.1 March 02 2020

    Petabridge.Cmd 0.7.1 introduces some minor bug fixes and updates prior to the release of Akka.NET v1.4.0:

    • Fixed bug where all addresses in Akka.Cluster.Sharding region-stats appeared to be the address of the local node running the report;
    • Upgraded to Akka.NET 1.3.17;
    • Added integration test to verify Serilog compatibility for logging steps.

    In order for Akka.Logger.Serilog to work with Petabridge.Cmd.Host, the Akka.NET Testkit, Phobos, or any other component you must always call the Serilog logging adapter from your actor code like this in order to use Serilog semantic logging:

    var log = Context.GetLogger<SerilogLoggingAdapter>(); // correct
    log.Info("My boss makes me use {semantic} logging", "semantic"); // serilog semantic logging format
    

    If you do the following you will get string formatting errors everywhere:

    var log = Context.GetLogger(); // INCORRECT
    log.Info("My boss makes me use {semantic} logging", "semantic"); // will throw string formatting errors everywhere
    

    v0.7.0 October 03 2019

    Petabridge.Cmd v0.7.0 doesn't introduce any new features or behavioral changes, but it does:

    • pbm now supports .NET Core 3.0, so it can be bundled via dotnet tool on installations that only run .NET Core 3.0 and higher
    • Petabridge.Cmd.Common - added new public method to CommandParser which can take an entire pbm command as a string and fully tokenize / parse it into its component parts per the CommandPalette schema provided to it. CommandParser.Parse(string).
    • All Petabridge.Cmd modules now depend on Akka.NET v1.3.15.

    v0.6.3 July 30 2019

    In Petabridge.Cmd v0.6.3 the only major change consists of upgrading our internal Akka.NET dependency to v1.3.14. This was done in order to ensure that the Petabridge.Cmd.Cluster.Sharding region-stats command wouldn't run into Akka.NET issue #3830 when running on non-coordinator nodes.

    v0.6.2 June 19 2019

    In version v0.6.2 we have made the following minor improvements:

    pbm Client Changes Beginning with version 0.6.2, pbm will automatically connect to 127.0.0.1:9110 if you do not provide an explicilt address by default.

    So the following commands will do:

    • pbm - connects automatically to 127.0.0.1:9110 in interactive mode
    • pbm log tail - automatically executes the log tail command on 127.0.0.1:9110

    This was done in order to make it easier to support common scenarios, such as executing pbm from within a Docker container using docker exec.

    Petabridge.Cmd.Remote Changes

    1. Added additional event tracking to the history command. The history command will now track:
      1. Associated events.
      2. Disassociated events.
      3. Association error events.
      4. Quarantined Events.
      5. ThisActorSystemQuarantined events.
    2. Added additional status information. The remote status command will now provide quarantine information and will display any members that have been quarantined with their respective address and UID. It will also show when the node that is hosting pbm has been quarantined.

    v0.6.1 May 19 2019

    In version v0.6.1 we made the following minor improvements:

    1. Made it so the Petabridge.Cmd pbm terminal automatically exits when the host disconnects;
    2. Added the ArgumentsExtractor to Petabridge.Cmd.Common - this will simplify the process of extracting all supplied arguments to any Petabridge.Cmd.Host.CommandHandlerActor. There's a new overload added to the CommandHandlerActor, Process(string commandName, Action<Command, ParsedArguments> handler) and the ParsedArguments object will contain a pre-parsed set of all arguments and their possible values. See the official documentation on https://cmd.petabridge.com/ for more details.

    v0.6.0 May 09 2019

    With the release of Petabridge.Cmd V0.6.0 we are introducing Petabridge.Cmd.Remote - a new command palette for monitoring your Akka.Remote connections through the use of Akka.Remote.

    The new commands will allow you to monitor the connections in your system by providing information such as the active connections to remote hosts and a history of Associated and Disassociated events.

    The Highlights of Changes Made in Petabridge.Cmd V0.6.0

    Introduction of Petabridge.Cmd.Remote.

    The following commands are now available:

    • remote stats
    • remote history
    • remote connections
    • remote tails

    Upgrade to Akka.Net v1.3.13.

    v0.6.0 May 09 2019

    With the release of Petabridge.Cmd V0.6.0 we are introducing Petabridge.Cmd.Remote - a new command palette for monitoring your Akka.Remote connections through the use of Akka.Remote.

    The new commands will allow you to monitor the connections in your system by providing information such as the active connections to remote hosts and a history of Associated and Disassociated events.

    The Highlights of Changes Made in Petabridge.Cmd V0.6.0

    Introduction of Petabridge.Cmd.Remote.

    The following commands are now available:

    • remote stats
    • remote history
    • remote connections
    • remote tails

    Upgrade to Akka.Net v1.3.13.

    v0.5.0 March 05 2019

    In Petabridge.Cmd v0.5.0 we are introducing a brand new command palette for managing and monitoring your Akka.Cluster.Sharding activity, Petabridge.Cmd.Cluster.Sharding, which is available as a pre-release NuGet package given that Akka.Cluster.Sharding is still currently in beta.

    These commands allow you to query the current state of any ShardRegion as long as Petabridge.Cmd.Host is running on a node that hosts one of the aforementioned ShardRegions. This can be really helpful in visualizing the distribution of your shards and entities across all of the nodes of your cluster.

    In addition to this change, here are the other changes we have made in Petabridge.Cmd v0.5.0:

    • Added the cluster tail command, which works similarly to the log tail command, only that in this instance we are explicitly tracking just changes to the cluster as they occur in real-time. This can be really useful for logging, debugging, or troubleshooting.
    • Fixed Log peek does not honor log level filter when no size is specified.
    • Upgraded to Akka.NET v1.3.11.

    v0.4.1 December 06 2018

    Fixed an issue with the pbm .NET Core Global tool that caused it to access an unsupported API on Linux and OS X. This has been fixed.

    v0.4.0 November 27 2018

    Petabridge.Cmd upgrade to support cross-platform pbm usage and global .NET Core tooling support.

    Petabridge.Cmd is now available as a .NET Core Global tool, in addition to our standard Chocolatey distribution.

    To use this feature, you will need to have .NET Core SDK 2.1.300 or higher installed on your local system. Provided that this SDK version is available, the pbm command can now be installed as a global .NET Core tool and used on both Windows and Linux systems.

    dotnet tool install --global pbm

    This change should help make it easier to use Petabridge.Cmd inside environments like Docker containers, OS X, Linux, and more.

    Small Fixes

    • Upgraded to Akka.NET v1.3.10

    v0.3.3 February 27 2018

    Petabridge.Cmd maintenance release for v0.3.*.

    • Upgraded to Akka.NET v1.3.5;
    • Added: Add a "count" to the end of cluster show command
    • Added: Support for MemberStatus.WeaklyUp in all Petabridge.Cmd.Cluster commands

    v0.3.2 December 19 2017

    Petabridge.Cmd maintenance release for v0.3.*.

    • Upgraded to Akka.NET v1.3.2;
    • Fixed: serialization error: Destination array is not long enough; and
    • Added BoundEndpoint and IsBound properties to the PetabridgeCmd class, designed to make it easier for users to use port zero in production and connect to PetabridgeCmd programmatically.

    v0.3.1 September 19 2017

    Petabridge.Cmd maintenance release for v0.3.*.

    • Fixed an issue with pbm client where it would throw a NullReferenceException upon connection failure to Petabridge.Cmd.Host. This has been resolved.

    v0.3.0 September 13 2017

    Petabridge.Cmd upgrade to support Akka.NET v1.3.1 and .NET Core.

    • Upgraded to Akka.NET v1.3.1;
    • Migrated serialization from Hyperion to Google Protocol buffer in order to better support .NET Core applications; and
    • Disallowed commands with spaces in the name, since those aren't compatible on the command line.

    In addition to all of the above, the following modules are now available on .NET Standard 1.6 as well as .NET 4.5:

    • Petabridge.Cmd.Common;
    • Petabridge.Cmd.Host;
    • Petabridge.Cmd.Cluster; and
    • Petabridge.Cmd.Testing.

    The pbm client still ships via Chocolatey as a .NET 4.6.1 executable and it's able to connect to .NET 4.* and .NET Core applications alike.

    Note: Petabridge.Cmd v0.3.0 is not wire compatible with versions v0.2.2 and earlier. You will need to upgrade your Petabridge.Cmd.Host installations first and then upgrade your pbm clients seconds.

    v0.2.2 June 25 2017

    • Resolved issue with resetting window name back to its original title after exiting pbm #7
    • Resolved issue with End, Home, left arrow, right arrow, and Delete keys not working correctly in interactive mode. #6
    • Resolved issue with lines not wrapping correctly when using tab autocomplete with long commands. #1
    • Corrected assembly version number of Petabridge.Cmd.Common; it now syncs correctly with its NuGet package number. #5
    • Added cluster down-unreachable command to allow a node to automatically down all unreachable nodes. #8

    v0.2.1 May 31 2017

    Added minor bug fixes and other changes.

    v0.2.0 May 21 2017

    Added support for actor hierarchy visualization via the actor hierarchy built-in command.

    v0.1.2 April 24 2017

    Petabridge.Cmd helps you automate, manage, and monitor Akka.NET applications of all shapes and sizes. It's available as a simple commandline tool that requires minimal setup and configuration overhead.

    Added connectivity commands; fixed bugs with logging commands; improved CommandHandlerActor usability. And more.

    v0.1.1 April 20 2017

    Petabridge.Cmd helps you automate, manage, and monitor Akka.NET applications of all shapes and sizes. It's available as a simple commandline tool that requires minimal setup and configuration overhead.

    Fixed formatting for commands, Petabridge.Cmd.Host NuGet package dependencies, and more minor fixes.

    v0.1.0 April 04 2017

    Petabridge.Cmd helps you automate, manage, and monitor Akka.NET applications of all shapes and sizes. It's available as a simple commandline tool that requires minimal setup and configuration overhead.

    Features:

    • Logging - perform a live tail of logs on any of your Akka.NET nodes, search through existing log data, and more.
    • Cluster Management - view the current status of your cluster; down unreachable nodes; trigger graceful exits; join new nodes; and more.
    • Extensibility - easily define your own commands that can automatically be handled by the petabridge.cmd commandline client, or install additional "command palettes" that can extend your management capabilities.
    • Ease of use - petabrige.cmd is simple and includes helpful features such as tab-autocomplete and built-in help documentation.
    • Cross-platform - runs great on both Windows and Linux.
    Back to top Generated by DocFX