When tracing an application, it can be useful to know which ETW events are available. .NET exposes many events to trace an application as shown in some previous posts (Getting telemetry data from inside or outside a .NET application, or Avoid DNS issues with HttpClient in .NET). It's hard to know w
I found myself today needing to upload a file to S3, the upload size is a few hundred GBs in size. I expected the appropriate command, like so:
aws s3api put-object --bucket twitter-2020-rvn-dump --key mydb.backup --body ./mydb.backup
But then I realized that this is uploading a few hundred GB file to S3, which may take a while. The command doesn’t have any progress information, so I had no way to figure out where it is at.
I decided to see what I can poke around to find, first, I ran this command:
ps -aux | grep s3api
This gave me the PID of the upload process in question.
Then I checked the file descriptors for this process, like so:
$ ls -alh /proc/84957/fd
total 0dr-x------ 2 ubuntu ubuntu 0 Mar 30 08:10 .dr-xr-xr-x 9 ubuntu ubuntu 0 Mar 30 08:00 ..lrwx------ 1 ubuntu ubuntu 64 Mar 30 08:10 0 -> /dev/pts/8lrwx------ 1 ubuntu ubuntu 64 Mar 30 08:10 1 -> /dev/pts/8lrwx------ 1 ubuntu ubuntu 64 Mar 30 08:10 2 -> /dev/pts/8lr-x------ 1 ubuntu ubuntu 64 Mar 30 08:10 3 -> /backups/mydb.backup
As you can see, we can tell that file descriptor#3 is the one that we care about, then we can ask for more details:
$ cat /proc/84957/fdinfo/3
pos: 140551127040
flags: 02400000
mnt_id: 96
ino: 57409538
In other words, the process is currently at ~130GB of the file or there about.
It’s not ideal, but it does give me some idea about where we are at. It is a nice demonstration of the ability to poke into the insides of a running system to figure out what is going on.
You sometimes need to detect when a console application is closing to perform some cleanup. Console.CancelKeyPress allows registering a callback when a user press Ctrl+C or Ctrl+Break. This event can prevent the application from closing, so you can take a few seconds to perform the cleanup before a
RavenDB has the public live test instance, and we have recently upgraded that to version 6.0. That means that you can start playing around with RavenDB 6.0 directly, including giving us feedback on any issues that you find.
Of particular interest, of course, is the sharding feature, it is right here:
And once enabled, you can see things in more details:
If we did things properly, the only thing you’ll notice that indicates that you are running in sharded mode is:
Take a look, and let us know what you think.
As a reminder, at the top right of the page, there is the submit feedback option:
Use it, we are waiting for your insights.
There are at least 6 different timers classes in .NET! Each timer has its purpose and use-case. I will try to explain the differences between them.First, there are UI-specific timers. These timers are used to execute code on the UI thread. They are:System.Windows.Forms.TimerSystem.Windows.Threading
In this post, I describe how I work day-to-day with Git using JetBrains' Rider, working exclusively with keyboard shortcuts, but with the benefits of a GUI…